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
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
Squashfs: Compute expected length from inode size rather than block length
Tip revision: a3f94cb
File | Mode | Size |
---|---|---|
6lowpan | ||
802 | ||
8021q | ||
9p | ||
appletalk | ||
atm | ||
ax25 | ||
batman-adv | ||
bluetooth | ||
bpf | ||
bpfilter | ||
bridge | ||
caif | ||
can | ||
ceph | ||
core | ||
dcb | ||
dccp | ||
decnet | ||
dns_resolver | ||
dsa | ||
ethernet | ||
hsr | ||
ieee802154 | ||
ife | ||
ipv4 | ||
ipv6 | ||
iucv | ||
kcm | ||
key | ||
l2tp | ||
l3mdev | ||
lapb | ||
llc | ||
mac80211 | ||
mac802154 | ||
mpls | ||
ncsi | ||
netfilter | ||
netlabel | ||
netlink | ||
netrom | ||
nfc | ||
nsh | ||
openvswitch | ||
packet | ||
phonet | ||
psample | ||
qrtr | ||
rds | ||
rfkill | ||
rose | ||
rxrpc | ||
sched | ||
sctp | ||
smc | ||
strparser | ||
sunrpc | ||
switchdev | ||
tipc | ||
tls | ||
unix | ||
vmw_vsock | ||
wimax | ||
wireless | ||
x25 | ||
xdp | ||
xfrm | ||
Kconfig | -rw-r--r-- | 13.9 KB |
Makefile | -rw-r--r-- | 2.5 KB |
compat.c | -rw-r--r-- | 25.9 KB |
socket.c | -rw-r--r-- | 83.6 KB |
sysctl_net.c | -rw-r--r-- | 3.0 KB |
Computing file changes ...