HomeFreeBSD

bhyve: avoid overflow of BAR index

Description

bhyve: avoid overflow of BAR index

At the moment, writes to BAR registers that aren't 4 byte aligned are
ignored. So, there's no overflow yet. Nevertheless, if this behaviour
changes in the future, it could unintentionally, introduce a buffer
overflow. Additionally, some compiler or tools will detect this
potential overflow and complain about it.

Reviewed by: markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision: https://reviews.freebsd.org/D34689

Details

Provenance
c.koehne_beckhoff.comAuthored on Apr 1 2022, 8:18 AM
manuCommitted on Apr 1 2022, 9:13 AM
Reviewer
markj
Differential Revision
D34689: bhyve: avoid overflow of BAR index
Parents
rG4fc5a607fdf4: bsd-family-tree: macOS 11 and macOS 12
Branches
Unknown
Tags
Unknown