• Linus Torvalds's avatar
    squashfs metadata 2: electric boogaloo · cdbb65c4
    Linus Torvalds authored
    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: 's avatarAnatoly Trosinenko <anatoly.trosinenko@gmail.com>
    Tested-by: 's avatarWilly Tarreau <w@1wt.eu>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Phillip Lougher <phillip@squashfs.org.uk>
    Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
    cdbb65c4
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
block.c Loading commit data...
cache.c Loading commit data...
decompressor.c Loading commit data...
decompressor.h Loading commit data...
decompressor_multi.c Loading commit data...
decompressor_multi_percpu.c Loading commit data...
decompressor_single.c Loading commit data...
dir.c Loading commit data...
export.c Loading commit data...
file.c Loading commit data...
file_cache.c Loading commit data...
file_direct.c Loading commit data...
fragment.c Loading commit data...
id.c Loading commit data...
inode.c Loading commit data...
lz4_wrapper.c Loading commit data...
lzo_wrapper.c Loading commit data...
namei.c Loading commit data...
page_actor.c Loading commit data...
page_actor.h Loading commit data...
squashfs.h Loading commit data...
squashfs_fs.h Loading commit data...
squashfs_fs_i.h Loading commit data...
squashfs_fs_sb.h Loading commit data...
super.c Loading commit data...
symlink.c Loading commit data...
xattr.c Loading commit data...
xattr.h Loading commit data...
xattr_id.c Loading commit data...
xz_wrapper.c Loading commit data...
zlib_wrapper.c Loading commit data...
zstd_wrapper.c Loading commit data...