aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2018-08-02 16:45:15 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-02 09:34:02 -0700
commita3f94cb99a854fa381fe7fadd97c4f61633717a5 (patch)
tree9de67b4b1fa9b93ded20dc65bd4b7fd059ef6813 /net/ipv4/tcp_input.c
parentsquashfs: more metadata hardening (diff)
downloadlinux-dev-a3f94cb99a854fa381fe7fadd97c4f61633717a5.tar.xz
linux-dev-a3f94cb99a854fa381fe7fadd97c4f61633717a5.zip
Squashfs: Compute expected length from inode size rather than block length
Previously in squashfs_readpage() when copying data into the page cache, it used the length of the datablock read from the filesystem (after decompression). However, if the filesystem has been corrupted this data block may be short, which will leave pages unfilled. The fix for this is to compute the expected number of bytes to copy from the inode size, and use this to detect if the block is short. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> Tested-by: Willy Tarreau <w@1wt.eu> Cc: Анатолий Тросиненко <anatoly.trosinenko@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/tcp_input.c')
0 files changed, 0 insertions, 0 deletions