syzbot


KMSAN: uninit-value in z_erofs_lz4_decompress (2)

Status: fixed on 2024/01/30 15:47
Subsystems: erofs
[Documentation on labels]
Reported-by: syzbot+6c746eea496f34b3161d@syzkaller.appspotmail.com
Fix commit: 496530c7c1df erofs: avoid debugging output for (de)compressed data
First crash: 167d, last: 81d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KMSAN: uninit-value in z_erofs_lz4_decompress (3) erofs C 16 71d 78d 0/26 closed as dup on 2024/03/19 10:34
Discussions (4)
Title Replies (including bot) Last reply
[syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3) 5 (11) 2024/03/19 10:34
[PATCH] erofs: fix uninit-value in z_erofs_lz4_decompress 3 (3) 2023/12/31 02:32
[syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (2) 1 (8) 2023/12/28 22:12
[PATCH] erofs: avoid debugging output for (de)compressed data 2 (2) 2023/12/28 01:29
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in z_erofs_lz4_decompress erofs 1 257d 257d 0/26 auto-obsoleted due to no activity on 2023/11/03 19:44
upstream KMSAN: uninit-value in z_erofs_lz4_decompress (3) erofs C 16 71d 78d 0/26 closed as dup on 2024/03/19 10:34
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) net C 138977 420d 772d 22/26 fixed on 2023/02/24 13:50
upstream KMSAN: kernel-infoleak in _copy_to_iter (8) mm C 21180 315d 410d 22/26 fixed on 2023/06/08 14:41
Last patch testing requests (6)
Created Duration User Patch Repo Result
2023/12/28 22:12 25m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fbafc3e621c3 OK log
2023/12/28 14:08 18m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fbafc3e621c3 report log
2023/12/28 13:54 20m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fbafc3e621c3 report log
2023/12/28 05:56 17m lizhi.xu@windriver.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fbafc3e621c3 report log
2023/12/28 03:36 25m hsiangkao@linux.alibaba.com git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test OK log
2023/12/28 01:11 17m lizhi.xu@windriver.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fbafc3e621c3 report log

Sample crash report:
loop0: detected capacity change from 0 to 16
erofs: (device loop0): mounted with root inode @ nid 36.
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
 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
 filemap_read_folio+0xce/0x370 mm/filemap.c:2323
 do_read_cache_folio+0x3b4/0x11e0 mm/filemap.c:3691
 read_cache_folio+0x60/0x80 mm/filemap.c:3723
 erofs_bread+0x286/0x6f0 fs/erofs/data.c:46
 erofs_find_target_block fs/erofs/namei.c:103 [inline]
 erofs_namei+0x2fe/0x1790 fs/erofs/namei.c:177
 erofs_lookup+0x100/0x3c0 fs/erofs/namei.c:206
 lookup_one_qstr_excl+0x233/0x520 fs/namei.c:1609
 filename_create+0x2fc/0x6d0 fs/namei.c:3876
 do_mkdirat+0x69/0x800 fs/namei.c:4121
 __do_sys_mkdirat fs/namei.c:4144 [inline]
 __se_sys_mkdirat fs/namei.c:4142 [inline]
 __x64_sys_mkdirat+0xc8/0x120 fs/namei.c:4142
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Uninit was created at:
 __alloc_pages+0x9a4/0xe00 mm/page_alloc.c:4591
 alloc_pages_mpol+0x62b/0x9d0 mm/mempolicy.c:2133
 alloc_pages mm/mempolicy.c:2204 [inline]
 folio_alloc+0x1da/0x380 mm/mempolicy.c:2211
 filemap_alloc_folio+0xa5/0x430 mm/filemap.c:974
 do_read_cache_folio+0x163/0x11e0 mm/filemap.c:3655
 read_cache_folio+0x60/0x80 mm/filemap.c:3723
 erofs_bread+0x286/0x6f0 fs/erofs/data.c:46
 erofs_find_target_block fs/erofs/namei.c:103 [inline]
 erofs_namei+0x2fe/0x1790 fs/erofs/namei.c:177
 erofs_lookup+0x100/0x3c0 fs/erofs/namei.c:206
 lookup_one_qstr_excl+0x233/0x520 fs/namei.c:1609
 filename_create+0x2fc/0x6d0 fs/namei.c:3876
 do_mkdirat+0x69/0x800 fs/namei.c:4121
 __do_sys_mkdirat fs/namei.c:4144 [inline]
 __se_sys_mkdirat fs/namei.c:4142 [inline]
 __x64_sys_mkdirat+0xc8/0x120 fs/namei.c:4142
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

CPU: 1 PID: 5006 Comm: syz-executor342 Not tainted 6.7.0-rc7-syzkaller-00003-gfbafc3e621c3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
=====================================================

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/27 11:29 upstream fbafc3e621c3 fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/29 06:11 upstream 9f8413c4a66f cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/27 16:03 upstream 9f8413c4a66f cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/24 12:05 upstream 9f8413c4a66f 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/24 11:59 upstream 9f8413c4a66f 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/24 11:59 upstream 9f8413c4a66f 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/24 06:00 upstream 9f8413c4a66f 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/11 01:16 upstream 9f8413c4a66f 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/11 01:09 upstream 9f8413c4a66f 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/04 05:30 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/02 08:44 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/27 08:50 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/27 08:47 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/29 06:15 upstream 9f8413c4a66f cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/27 16:06 upstream 9f8413c4a66f cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/24 12:03 upstream 9f8413c4a66f 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/24 06:02 upstream 9f8413c4a66f 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/11 01:10 upstream 9f8413c4a66f 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2024/01/02 23:00 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/27 09:41 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/27 08:51 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/27 08:42 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/25 20:55 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/25 20:30 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/25 20:16 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in z_erofs_lz4_decompress
2023/12/07 01:29 upstream bee0e7762ad2 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/26 07:04 upstream b46ae77f6787 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/21 04:00 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/14 14:00 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/13 17:07 upstream b85ea95d0864 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/05 09:30 upstream aea6bf908d73 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/04 08:30 upstream 8f6f76a6a29f 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
2023/11/04 03:33 upstream 8f6f76a6a29f 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in z_erofs_lz4_decompress
* Struck through repros no longer work on HEAD.