summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs3client.c
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2021-02-09 13:41:56 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-09 17:26:44 -0800
commiteabac19e40c095543def79cb6ffeb3a8588aaff4 (patch)
tree6fbdbedde99af1b08b12344d640a8a5d758914a9 /fs/nfs/nfs3client.c
parentf37aa4c7366e23f91b81d00bafd6a7ab54e4a381 (diff)
downloadlinux-eabac19e40c095543def79cb6ffeb3a8588aaff4.tar.bz2
squashfs: add more sanity checks in inode lookup
Sysbot has reported an "slab-out-of-bounds read" error which has been identified as being caused by a corrupted "ino_num" value read from the inode. This could be because the metadata block is uncompressed, or because the "compression" bit has been corrupted (turning a compressed block into an uncompressed block). This patch adds additional sanity checks to detect this, and the following corruption. 1. It checks against corruption of the inodes count. This can either lead to a larger table to be read, or a smaller than expected table to be read. In the case of a too large inodes count, this would often have been trapped by the existing sanity checks, but this patch introduces a more exact check, which can identify too small values. 2. It checks the contents of the index table for corruption. [phillip@squashfs.org.uk: fix checkpatch issue] Link: https://lkml.kernel.org/r/527909353.754618.1612769948607@webmail.123-reg.co.uk Link: https://lkml.kernel.org/r/20210204130249.4495-4-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> Reported-by: syzbot+04419e3ff19d2970ea28@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs/nfs3client.c')
0 files changed, 0 insertions, 0 deletions