Skip to content

Squashfs: extra sanity checks and sanity check fixes

Phillip Lougher linux-fsdevel lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Squashfs: fix corruption check in get_dir_index_using_name()fs/squashfs/namei.c+1 -30 replies
2/5Squashfs: fix corruption checks in squashfs_lookup()fs/squashfs/namei.c+2 -10 replies
3/5Squashfs: fix corruption checks in squashfs_readdir()fs/squashfs/dir.c+2 -30 replies
4/5Squashfs: add corruption check in get_dir_index_using_offset()fs/squashfs/dir.c+8 -10 replies
5/5Squashfs: add corruption check for type in squashfs_readdir()fs/squashfs/dir.c fs/squashfs/squashfs_fs.h+9 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Squashfs: extra sanity checks and sanity check fixes

Hi,

Following on from the "Squashfs: sanity check information from disk" patch from Dan Carpenter, I have added a couple more sanity checks, and fixed a couple of existing sanity checks (including the patch from Dan Carpenter).

These sanity checks mainly exist to trap maliciously corrupted filesystems either through using a deliberately modified mksquashfs, or where the user has deliberately chosen to generate uncompressed metadata and then corrupted it.

Normally metadata in Squashfs filesystems is compressed, which means corruption (either accidental or malicious) is detected when trying to decompress the metadata. So corrupted data does not normally get as far as the code paths in question here.

Phillip Lougher (5):
Squashfs: fix corruption check in get_dir_index_using_name()
Squashfs: fix corruption checks in squashfs_lookup()
Squashfs: fix corruption checks in squashfs_readdir()
Squashfs: add corruption check in get_dir_index_using_offset()
Squashfs: add corruption check for type in squashfs_readdir()

 fs/squashfs/dir.c         | 17 +++++++++++++----
 fs/squashfs/namei.c       |  7 +++----
 fs/squashfs/squashfs_fs.h |  5 ++++-
 3 files changed, 20 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.3.2