linux-stable/fs/erofs
Gao Xiang 496530c7c1 erofs: avoid debugging output for (de)compressed data
Syzbot reported a KMSAN warning,
erofs: (device loop0): z_erofs_lz4_decompress_mem: failed to decompress -12 in[46, 4050] out[917]
=====================================================
BUG: KMSAN: uninit-value in hex_dump_to_buffer+0xae9/0x10f0 lib/hexdump.c:194
  ..
  print_hex_dump+0x13d/0x3e0 lib/hexdump.c:276
  z_erofs_lz4_decompress_mem fs/erofs/decompressor.c:252 [inline]
  z_erofs_lz4_decompress+0x257e/0x2a70 fs/erofs/decompressor.c:311
  z_erofs_decompress_pcluster fs/erofs/zdata.c:1290 [inline]
  z_erofs_decompress_queue+0x338c/0x6460 fs/erofs/zdata.c:1372
  z_erofs_runqueue+0x36cd/0x3830
  z_erofs_read_folio+0x435/0x810 fs/erofs/zdata.c:1843

The root cause is that the printed decompressed buffer may be filled
incompletely due to decompression failure.  Since they were once only
used for debugging, get rid of them now.

Reported-and-tested-by: syzbot+6c746eea496f34b3161d@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/000000000000321c24060d7cfa1c@google.com
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20231227151903.2900413-1-hsiangkao@linux.alibaba.com
2024-01-10 19:59:39 +08:00
..
compress.h erofs: simplify compression configuration parser 2023-10-31 06:57:19 +08:00
data.c erofs: fix NULL dereference of dif->bdev_handle in fscache mode 2023-11-17 19:55:46 +08:00
decompressor.c erofs: avoid debugging output for (de)compressed data 2024-01-10 19:59:39 +08:00
decompressor_deflate.c erofs: tidy up redundant includes 2023-10-31 06:58:49 +08:00
decompressor_lzma.c erofs: tidy up redundant includes 2023-10-31 06:58:49 +08:00
dir.c erofs: keep meta inode into erofs_buf 2023-04-17 01:15:50 +08:00
erofs_fs.h erofs: update on-disk format for xattr name filter 2023-08-11 12:11:44 +08:00
fscache.c erofs: avoid hardcoded blocksize for subpage block support 2023-04-17 01:15:44 +08:00
inode.c erofs: enable sub-page compressed block support 2023-12-18 15:49:39 +08:00
internal.h Changes since last update: 2023-11-02 07:53:57 -10:00
Kconfig MAINTAINERS: erofs: add EROFS webpage 2023-11-17 19:55:46 +08:00
Makefile erofs: DEFLATE compression support 2023-08-11 12:11:17 +08:00
namei.c erofs: sunset erofs_dbg() 2023-04-17 01:15:54 +08:00
pcpubuf.c erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init 2023-03-09 22:49:30 +08:00
super.c vfs-6.7.fsid 2023-11-07 12:11:26 -08:00
sysfs.c erofs: make kobj_type structures constant 2023-02-15 08:11:26 +08:00
utils.c Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
xattr.c erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata 2023-10-09 16:24:17 +02:00
xattr.h erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata 2023-10-09 16:24:17 +02:00
zdata.c erofs: allow partially filled compressed bvecs 2023-12-21 22:58:21 +08:00
zmap.c erofs: fix up compacted indexes for block size < 4096 2023-12-15 01:47:19 +08:00