Page MenuHomeFreeBSD

Fix kvm bitmap index
AbandonedPublic

Authored by luporl on Sep 6 2019, 5:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 2, 6:41 PM
Unknown Object (File)
Fri, Feb 27, 8:30 PM
Unknown Object (File)
Fri, Feb 27, 4:34 PM
Unknown Object (File)
Sun, Feb 22, 3:43 PM
Unknown Object (File)
Mon, Feb 16, 7:17 PM
Unknown Object (File)
Thu, Feb 12, 9:44 PM
Unknown Object (File)
Jan 29 2026, 4:49 AM
Unknown Object (File)
Jan 23 2026, 2:40 PM
Subscribers

Details

Reviewers
will
emaste
Summary

_kvm_bitmap_next may perform an out-of-bounds access on bm->map array.
It seems the right is to divide *idx by CHAR_BIT, instead of multiplying it.

Another thing that looks strange to me is the function returning when it finds a bit that is not set. Shouldn't it be the opposite?

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26319
Build 24798: arc lint + arc unit