diff options
author | Fedor Pchelkin <pchelkin@ispras.ru> | 2023-01-17 11:52:26 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-01 01:44:08 +0100 |
commit | 72e544b1b28325fe78a4687b980871a7e4101f76 (patch) | |
tree | 9962f7fdd3d5c3ec02f968ce2103f085a97af802 /mm/mremap.c | |
parent | ia64: fix build error due to switch case label appearing next to declaration (diff) | |
download | linux-72e544b1b28325fe78a4687b980871a7e4101f76.tar.xz linux-72e544b1b28325fe78a4687b980871a7e4101f76.zip |
squashfs: harden sanity check in squashfs_read_xattr_id_table
While mounting a corrupted filesystem, a signed integer '*xattr_ids' can
become less than zero. This leads to the incorrect computation of 'len'
and 'indexes' values which can cause null-ptr-deref in copy_bio_to_actor()
or out-of-bounds accesses in the next sanity checks inside
squashfs_read_xattr_id_table().
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
Link: https://lkml.kernel.org/r/20230117105226.329303-2-pchelkin@ispras.ru
Fixes: 506220d2ba21 ("squashfs: add more sanity checks in xattr id lookup")
Reported-by: <syzbot+082fa4af80a5bb1a9843@syzkaller.appspotmail.com>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions