]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/f2fs: Do not read past the end of nat journal entries
authorSudhakar Kuppusamy <sudhakar@linux.ibm.com>
Wed, 6 Apr 2022 12:33:37 +0000 (18:03 +0530)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 7 Jun 2022 14:39:33 +0000 (16:39 +0200)
commit4bd9877f62166b7e369773ab92fe24a39f6515f8
treec2a00260cd3af2497ec3200632ab0680fec48d61
parentb26b4c08e7119281ff30d0fb4a6169bd2afa8fe4
fs/f2fs: Do not read past the end of nat journal entries

A corrupt f2fs file system could specify a nat journal entry count
that is beyond the maximum NAT_JOURNAL_ENTRIES.

Check if the specified nat journal entry count before accessing the
array, and throw an error if it is too large.

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>
grub-core/fs/f2fs.c