1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-26 02:25:00 -05:00
linux/fs/squashfs
Linus Torvalds cdbb65c4c7 squashfs metadata 2: electric boogaloo
Anatoly continues to find issues with fuzzed squashfs images.

This time, corrupt, missing, or undersized data for the page filling
wasn't checked for, because the squashfs_{copy,read}_cache() functions
did the squashfs_copy_data() call without checking the resulting data
size.

Which could result in the page cache pages being incompletely filled in,
and no error indication to the user space reading garbage data.

So make a helper function for the "fill in pages" case, because the
exact same incomplete sequence existed in two places.

[ I should have made a squashfs branch for these things, but I didn't
  intend to start doing them in the first place.

  My historical connection through cramfs is why I got into looking at
  these issues at all, and every time I (continue to) think it's a
  one-off.

  Because _this_ time is always the last time. Right?   - Linus ]

Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-01 10:38:43 -07:00
..
block.c squashfs: more metadata hardening 2018-07-30 17:29:17 -07:00
cache.c squashfs: be more careful about metadata corruption 2018-07-29 12:44:46 -07:00
decompressor.c
decompressor.h
decompressor_multi.c
decompressor_multi_percpu.c
decompressor_single.c
dir.c
export.c
file.c squashfs metadata 2: electric boogaloo 2018-08-01 10:38:43 -07:00
file_cache.c
file_direct.c squashfs metadata 2: electric boogaloo 2018-08-01 10:38:43 -07:00
fragment.c squashfs: be more careful about metadata corruption 2018-07-29 12:44:46 -07:00
id.c
inode.c
Kconfig
lz4_wrapper.c
lzo_wrapper.c
Makefile
namei.c
page_actor.c
page_actor.h
squashfs.h squashfs metadata 2: electric boogaloo 2018-08-01 10:38:43 -07:00
squashfs_fs.h squashfs: be more careful about metadata corruption 2018-07-29 12:44:46 -07:00
squashfs_fs_i.h
squashfs_fs_sb.h
super.c Rename superblock flags (MS_xyz -> SB_xyz) 2017-11-27 13:05:09 -08:00
symlink.c
xattr.c
xattr.h
xattr_id.c
xz_wrapper.c
zlib_wrapper.c
zstd_wrapper.c