]> xenbits.xensource.com Git - xen.git/commit
xen: fix buffer over-read in bitmap_to_xenctl_bitmap()
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 24 Apr 2025 10:23:14 +0000 (12:23 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Fri, 25 Apr 2025 12:50:19 +0000 (14:50 +0200)
commitcba90ddee086e8d26063d8de90e40a098395e99b
treea5c96235d4068c37e9a30da92c1ae9b830b2096f
parent7897492d8082f18073514a9380f361b4f5df5897
xen: fix buffer over-read in bitmap_to_xenctl_bitmap()

There's an off-by-one when calculating the last byte in the input array to
bitmap_to_xenctl_bitmap(), which leads to bitmaps with sizes multiple of 8
to over-read and incorrectly use a byte past the end of the array.

Fixes: 288c4641c80d ('xen: simplify bitmap_to_xenctl_bitmap for little endian')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/bitmap.c