grub/grub-core
Sudhakar Kuppusamy deae293f39 fs/f2fs: Do not read past the end of nat bitmap
A corrupt f2fs filesystem could have a block offset or a bitmap
offset that would cause us to read beyond the bounds of the nat
bitmap.

Introduce the nat_bitmap_size member in grub_f2fs_data which holds
the size of nat bitmap.

Set the size when loading the nat bitmap in nat_bitmap_ptr(), and
catch when an invalid offset would create a pointer past the end of
the allocated space.

Check against the bitmap size in grub_f2fs_test_bit() test bit to avoid
reading past the end of the nat bitmap.

Signed-off-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2022-06-07 16:39:33 +02:00
..
2022-03-14 15:45:03 +01:00
2022-03-14 15:46:38 +01:00
2022-03-14 16:00:27 +01:00
2017-08-14 16:27:10 +02:00
2017-05-03 12:49:31 +02:00
2017-05-03 12:49:31 +02:00