]> www.infradead.org Git - users/jedix/linux-maple.git/commit
udf: prevent integer overflow in udf_bitmap_free_blocks()
authorRoman Smirnov <r.smirnov@omp.ru>
Thu, 20 Jun 2024 07:24:13 +0000 (10:24 +0300)
committerJan Kara <jack@suse.cz>
Wed, 26 Jun 2024 10:54:11 +0000 (12:54 +0200)
commit56e69e59751d20993f243fb7dd6991c4e522424c
tree8d479c29747d9eb7121ee5b109ef530eaad08b8a
parentebbe26fd54a9621994bc16b14f2ba8f84c089693
udf: prevent integer overflow in udf_bitmap_free_blocks()

An overflow may occur if the function is called with the last
block and an offset greater than zero. It is necessary to add
a check to avoid this.

Found by Linux Verification Center (linuxtesting.org) with Svace.

[JK: Make test cover also unalloc table freeing]

Link: https://patch.msgid.link/20240620072413.7448-1-r.smirnov@omp.ru
Suggested-by: Jan Kara <jack@suse.com>
Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/balloc.c