u-boot/fs/squashfs
Miquel Raynal 2ac0baab4a fs/squashfs: sqfs_read: Prevent arbitrary code execution
Following Jincheng's report, an out-of-band write leading to arbitrary
code execution is possible because on one side the squashfs logic
accepts directory names up to 65535 bytes (u16), while U-Boot fs logic
accepts directory names up to 255 bytes long.

Prevent such an exploit from happening by capping directory name sizes
to 255. Use a define for this purpose so that developers can link the
limitation to its source and eventually kill it some day by dynamically
allocating this array (if ever desired).

Link: https://lore.kernel.org/all/CALO=DHFB+yBoXxVr5KcsK0iFdg+e7ywko4-e+72kjbcS8JBfPw@mail.gmail.com
Reported-by: Jincheng Wang <jc.w4ng@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Jincheng Wang <jc.w4ng@gmail.com>
2022-06-16 15:22:55 -04:00
..
Kconfig include/u-boot, lib/zlib: add sources for zlib decompression 2020-08-07 22:31:32 -04:00
Makefile
sqfs_decompressor.c fs/squashfs: add support for LZO decompression 2020-08-24 14:11:31 -04:00
sqfs_decompressor.h fs/squashfs: replace sqfs_decompress() parameter 2020-08-24 14:11:31 -04:00
sqfs_dir.c squashfs: Fix compilation on big endian systems 2022-06-03 11:15:24 -04:00
sqfs_filesystem.h fs/squashfs: Fix some hardlinks reading the wrong inode 2021-08-04 15:58:31 -04:00
sqfs_inode.c fs/squashfs: Fix compilation error 2021-03-04 14:40:52 -05:00
sqfs_utils.h
sqfs.c fs/squashfs: sqfs_read: Prevent arbitrary code execution 2022-06-16 15:22:55 -04:00