https://github.com/torvalds/linux
Revision a3f94cb99a854fa381fe7fadd97c4f61633717a5 authored by Phillip Lougher on 02 August 2018, 15:45:15 UTC, committed by Linus Torvalds on 02 August 2018, 16:34:02 UTC
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>
1 parent 71755ee
History
Tip revision: a3f94cb99a854fa381fe7fadd97c4f61633717a5 authored by Phillip Lougher on 02 August 2018, 15:45:15 UTC
Squashfs: Compute expected length from inode size rather than block length
Tip revision: a3f94cb
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 12.8 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.5 KB
.mailmap -rw-r--r-- 9.3 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.3 KB
Kbuild -rw-r--r-- 2.2 KB
Kconfig -rw-r--r-- 321 bytes
MAINTAINERS -rw-r--r-- 449.5 KB
Makefile -rw-r--r-- 58.2 KB
README -rw-r--r-- 800 bytes

README

back to top