All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
@ 2024-02-01 11:04 syzbot
  2024-02-01 12:20 ` [syzbot] " syzbot
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: syzbot @ 2024-02-01 11:04 UTC (permalink / raw)
  To: chao, huyue2, jefflexu, linux-erofs, linux-fsdevel, linux-kernel,
	syzkaller-bugs, xiang

Hello,

syzbot found the following issue on:

HEAD commit:    9f8413c4a66f Merge tag 'cgroup-for-6.8' of git://git.kerne..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=13d26b1fe80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=656820e61b758b15
dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11377218180000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=111fd038180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/79d9f2f4b065/disk-9f8413c4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cbc68430d9c6/vmlinux-9f8413c4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9740ad9fc172/bzImage-9f8413c4.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2f79f30d7608/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+88ad8b0517a9d3bb9dc8@syzkaller.appspotmail.com

erofs: (device loop0): z_erofs_lz4_decompress_mem: failed to decompress -42 in[46, 0] out[9000]
=====================================================
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_decompressqueue_work+0x57/0x70 fs/erofs/zdata.c:1387
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x104e/0x1e70 kernel/workqueue.c:2706
 worker_thread+0xf45/0x1490 kernel/workqueue.c:2787
 kthread+0x3ed/0x540 kernel/kthread.c:388
 ret_from_fork+0x66/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

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
 page_cache_ra_unbounded+0x2cc/0x960 mm/readahead.c:247
 do_page_cache_ra mm/readahead.c:299 [inline]
 page_cache_ra_order+0xfeb/0x10a0 mm/readahead.c:546
 ondemand_readahead+0x132b/0x1710 mm/readahead.c:668
 page_cache_sync_ra+0x724/0x760 mm/readahead.c:695
 page_cache_sync_readahead include/linux/pagemap.h:1283 [inline]
 filemap_get_pages+0x4c7/0x2c90 mm/filemap.c:2497
 filemap_read+0x59e/0x14d0 mm/filemap.c:2593
 generic_file_read_iter+0x136/0xad0 mm/filemap.c:2781
 __kernel_read+0x3bb/0x9e0 fs/read_write.c:434
 integrity_kernel_read+0x77/0x90 security/integrity/iint.c:221
 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline]
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline]
 ima_calc_file_hash+0x1743/0x3cc0 security/integrity/ima/ima_crypto.c:573
 ima_collect_measurement+0x44d/0xdd0 security/integrity/ima/ima_api.c:290
 process_measurement+0x2936/0x3ef0 security/integrity/ima/ima_main.c:359
 ima_file_check+0xb3/0x100 security/integrity/ima/ima_main.c:557
 do_open fs/namei.c:3624 [inline]
 path_openat+0x4d05/0x5ac0 fs/namei.c:3779
 do_filp_open+0x20d/0x590 fs/namei.c:3806
 do_sys_openat2+0x1bf/0x2f0 fs/open.c:1404
 do_sys_open fs/open.c:1419 [inline]
 __do_sys_open fs/open.c:1427 [inline]
 __se_sys_open fs/open.c:1423 [inline]
 __x64_sys_open+0x275/0x2d0 fs/open.c:1423
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x6d/0x140 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

CPU: 0 PID: 4393 Comm: kworker/u5:1 Not tainted 6.7.0-syzkaller-00562-g9f8413c4a66f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: erofs_worker z_erofs_decompressqueue_work
=====================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-01 11:04 [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3) syzbot
@ 2024-02-01 12:20 ` syzbot
  2024-02-01 16:17 ` Gao Xiang
  2024-02-01 23:30 ` [syzbot] " syzbot
  2 siblings, 0 replies; 13+ messages in thread
From: syzbot @ 2024-02-01 12:20 UTC (permalink / raw)
  To: linux-kernel

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
Author: eadavis@qq.com

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 021be5feb1bc..8ac3f96676c4 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -250,7 +250,8 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_lz4_decompress_ctx *ctx,
 		print_hex_dump(KERN_DEBUG, "[ in]: ", DUMP_PREFIX_OFFSET,
 			       16, 1, src + inputmargin, rq->inputsize, true);
 		print_hex_dump(KERN_DEBUG, "[out]: ", DUMP_PREFIX_OFFSET,
-			       16, 1, out, rq->outputsize, true);
+			       16, 1, out, (ret < 0 && rq->inputsize > 0) ? 
+			       (ret + rq->inputsize) : rq->outputsize, true);
 
 		if (ret >= 0)
 			memset(out + ret, 0, rq->outputsize - ret);


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-01 11:04 [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3) syzbot
  2024-02-01 12:20 ` [syzbot] " syzbot
@ 2024-02-01 16:17 ` Gao Xiang
  2024-02-01 16:57   ` syzbot
  2024-02-01 23:30 ` [syzbot] " syzbot
  2 siblings, 1 reply; 13+ messages in thread
From: Gao Xiang @ 2024-02-01 16:17 UTC (permalink / raw)
  To: syzbot, chao, huyue2, jefflexu, linux-erofs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, xiang

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

On 2024/2/1 19:04, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    9f8413c4a66f Merge tag 'cgroup-for-6.8' of git://git.kerne..
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=13d26b1fe80000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=656820e61b758b15
> dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11377218180000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=111fd038180000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/79d9f2f4b065/disk-9f8413c4.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/cbc68430d9c6/vmlinux-9f8413c4.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/9740ad9fc172/bzImage-9f8413c4.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/2f79f30d7608/mount_0.gz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+88ad8b0517a9d3bb9dc8@syzkaller.appspotmail.com
> 
> erofs: (device loop0): z_erofs_lz4_decompress_mem: failed to decompress -42 in[46, 0] out[9000]
> =====================================================
> 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_decompressqueue_work+0x57/0x70 fs/erofs/zdata.c:1387
>   process_one_work kernel/workqueue.c:2633 [inline]
>   process_scheduled_works+0x104e/0x1e70 kernel/workqueue.c:2706
>   worker_thread+0xf45/0x1490 kernel/workqueue.c:2787
>   kthread+0x3ed/0x540 kernel/kthread.c:388
>   ret_from_fork+0x66/0x80 arch/x86/kernel/process.c:147
>   ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
> 
> 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
>   page_cache_ra_unbounded+0x2cc/0x960 mm/readahead.c:247
>   do_page_cache_ra mm/readahead.c:299 [inline]
>   page_cache_ra_order+0xfeb/0x10a0 mm/readahead.c:546
>   ondemand_readahead+0x132b/0x1710 mm/readahead.c:668
>   page_cache_sync_ra+0x724/0x760 mm/readahead.c:695
>   page_cache_sync_readahead include/linux/pagemap.h:1283 [inline]
>   filemap_get_pages+0x4c7/0x2c90 mm/filemap.c:2497
>   filemap_read+0x59e/0x14d0 mm/filemap.c:2593
>   generic_file_read_iter+0x136/0xad0 mm/filemap.c:2781
>   __kernel_read+0x3bb/0x9e0 fs/read_write.c:434
>   integrity_kernel_read+0x77/0x90 security/integrity/iint.c:221
>   ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline]
>   ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline]
>   ima_calc_file_hash+0x1743/0x3cc0 security/integrity/ima/ima_crypto.c:573
>   ima_collect_measurement+0x44d/0xdd0 security/integrity/ima/ima_api.c:290
>   process_measurement+0x2936/0x3ef0 security/integrity/ima/ima_main.c:359
>   ima_file_check+0xb3/0x100 security/integrity/ima/ima_main.c:557
>   do_open fs/namei.c:3624 [inline]
>   path_openat+0x4d05/0x5ac0 fs/namei.c:3779
>   do_filp_open+0x20d/0x590 fs/namei.c:3806
>   do_sys_openat2+0x1bf/0x2f0 fs/open.c:1404
>   do_sys_open fs/open.c:1419 [inline]
>   __do_sys_open fs/open.c:1427 [inline]
>   __se_sys_open fs/open.c:1423 [inline]
>   __x64_sys_open+0x275/0x2d0 fs/open.c:1423
>   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
>   do_syscall_64+0x6d/0x140 arch/x86/entry/common.c:83
>   entry_SYSCALL_64_after_hwframe+0x63/0x6b
> 
> CPU: 0 PID: 4393 Comm: kworker/u5:1 Not tainted 6.7.0-syzkaller-00562-g9f8413c4a66f #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> Workqueue: erofs_worker z_erofs_decompressqueue_work
> =====================================================
> 
> 
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
> 
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
> 
> If the report is already addressed, let syzbot know by replying with:
> #syz fix: exact-commit-title
> 
> If you want syzbot to run the reproducer, reply with:
> #syz test: git://repo/address.git branch-or-commit-hash
> If you attach or paste a git patch, syzbot will apply it before testing.
> 
> If you want to overwrite report's subsystems, reply with:
> #syz set subsystems: new-subsystem
> (See the list of subsystem names on the web dashboard)
> 
> If the report is a duplicate of another one, reply with:
> #syz dup: exact-subject-of-another-report
> 
> If you want to undo deduplication, reply with:
> #syz undup

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-01 16:17 ` Gao Xiang
@ 2024-02-01 16:57   ` syzbot
  2024-02-20  6:50     ` Gao Xiang
  0 siblings, 1 reply; 13+ messages in thread
From: syzbot @ 2024-02-01 16:57 UTC (permalink / raw)
  To: chao, hsiangkao, huyue2, jefflexu, linux-erofs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, xiang

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

[    T1] NFS: Registering the id_resolver key type
[   20.847533][    T1] Key type id_resolver registered
[   20.852991][    T1] Key type id_legacy registered
[   20.859477][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[   20.868251][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[   20.901326][    T1] Key type cifs.spnego registered
[   20.907727][    T1] Key type cifs.idmap registered
[   20.917413][    T1] ntfs: driver 2.1.32 [Flags: R/W].
[   20.923298][    T1] ntfs3: Max link count 4000
[   20.928297][    T1] ntfs3: Enabled Linux POSIX ACLs support
[   20.934148][    T1] ntfs3: Read-only LZX/Xpress compression included
[   20.941172][    T1] efs: 1.0a - http://aeschi.ch.eu.org/efs/
[   20.947393][    T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
[   20.953397][    T1] QNX4 filesystem 0.2.3 registered.
[   20.958982][    T1] qnx6: QNX6 filesystem 1.0.0 registered.
[   20.965985][    T1] fuse: init (API version 7.39)
[   20.976858][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[   20.985505][    T1] orangefs_init: module version upstream loaded
[   20.993572][    T1] JFS: nTxBlock = 8192, nTxLock = 65536
[   21.034087][    T1] SGI XFS with ACLs, security attributes, realtime, quota, no debug enabled
[   21.051635][    T1] 9p: Installing v9fs 9p2000 file system support
[   21.058997][    T1] NILFS version 2 loaded
[   21.063484][    T1] befs: version: 0.9.3
[   21.068879][    T1] ocfs2: Registered cluster interface o2cb
[   21.075961][    T1] ocfs2: Registered cluster interface user
[   21.083257][    T1] OCFS2 User DLM kernel interface loaded
[   21.102750][    T1] gfs2: GFS2 installed
[   21.142225][    T1] ceph: loaded (mds proto 32)
[   25.265679][    T1] NET: Registered PF_ALG protocol family
[   25.271965][    T1] xor: automatically using best checksumming function   avx       
[   25.280055][    T1] async_tx: api initialized (async)
[   25.285498][    T1] Key type asymmetric registered
[   25.290927][    T1] Asymmetric key parser 'x509' registered
[   25.296825][    T1] Asymmetric key parser 'pkcs8' registered
[   25.302732][    T1] Key type pkcs7_test registered
[   25.308482][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 240)
[   25.318600][    T1] io scheduler mq-deadline registered
[   25.324054][    T1] io scheduler kyber registered
[   25.331126][    T1] io scheduler bfq registered
[   25.347558][    T1] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[   25.363347][  T136] kworker/u4:0 (136) used greatest stack depth: 11000 bytes left
[   25.374100][    T1] ACPI: button: Power Button [PWRF]
[   25.381760][    T1] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
[   25.392277][    T1] ACPI: button: Sleep Button [SLPF]
[   25.414526][    T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
[   25.499231][    T1] ACPI: \_SB_.LNKC: Enabled at IRQ 11
[   25.505226][    T1] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
[   25.579195][    T1] ACPI: \_SB_.LNKD: Enabled at IRQ 10
[   25.585070][    T1] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
[   25.662347][    T1] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[   25.668284][    T1] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
[   25.725221][    T1] virtio-pci 0000:00:07.0: virtio_pci: leaving for legacy driver
[   26.750369][    T1] N_HDLC line discipline registered with maxframe=4096
[   26.758188][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[   26.770021][    T1] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[   26.799322][    T1] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[   26.828884][    T1] 00:05: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A
[   26.856640][    T1] 00:06: ttyS3 at I/O 0x2e8 (irq = 7, base_baud = 115200) is a 16550A
[   26.903869][    T1] Non-volatile memory driver v1.3
[   26.925949][    T1] Linux agpgart interface v0.103
[   26.944845][    T1] ACPI: bus type drm_connector registered
[   26.963460][    T1] [drm] Initialized vgem 1.0.0 20120112 for vgem on minor 0
[   26.985308][    T1] [drm] Initialized vkms 1.0.0 20180514 for vkms on minor 1
[   27.457414][    T1] Console: switching to colour frame buffer device 128x48
[   27.612960][    T1] platform vkms: [drm] fb0: vkmsdrmfb frame buffer device
[   27.621207][    T1] usbcore: registered new interface driver udl
[   27.785853][    T1] brd: module loaded
[   27.962515][    T1] loop: module loaded
[   28.204419][    T1] zram: Added device: zram0
[   28.227930][    T1] null_blk: disk nullb0 created
[   28.232984][    T1] null_blk: module loaded
[   28.238841][    T1] Guest personality initialized and is inactive
[   28.247691][    T1] VMCI host device registered (name=vmci, major=10, minor=118)
[   28.255558][    T1] Initialized host personality
[   28.261000][    T1] usbcore: registered new interface driver rtsx_usb
[   28.269847][    T1] usbcore: registered new interface driver viperboard
[   28.277538][    T1] usbcore: registered new interface driver dln2
[   28.284724][    T1] usbcore: registered new interface driver pn533_usb
[   28.297696][    T1] nfcsim 0.2 initialized
[   28.302508][    T1] usbcore: registered new interface driver port100
[   28.309540][    T1] usbcore: registered new interface driver nfcmrvl
[   28.325751][    T1] Loading iSCSI transport class v2.0-870.
[   28.358008][    T1] virtio_scsi virtio0: 1/0/0 default/read/poll queues
[   28.395519][    T1] scsi host0: Virtio SCSI HBA
[   28.917048][    T1] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[   28.933542][   T11] scsi 0:0:1:0: Direct-Access     Google   PersistentDisk   1    PQ: 0 ANSI: 6
[   28.978523][    T1] Rounding down aligned max_sectors from 4294967295 to 4294967288
[   28.988652][    T1] db_root: cannot open: /etc/target
[   29.035870][    T1] =====================================================
[   29.036118][    T1] BUG: KMSAN: use-after-free in __list_del_entry_valid_or_report+0x19e/0x490
[   29.036138][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
[   29.036138][    T1]  stack_depot_save_flags+0x3e7/0x7b0
[   29.036138][    T1]  stack_depot_save+0x12/0x20
[   29.036138][    T1]  ref_tracker_alloc+0x215/0x700
[   29.036138][    T1]  netdev_hold+0xe2/0x120
[   29.036138][    T1]  register_netdevice+0x1bc7/0x2170
[   29.036138][    T1]  bond_create+0x138/0x2a0
[   29.036138][    T1]  bonding_init+0x1a7/0x2d0
[   29.036138][    T1]  do_one_initcall+0x216/0x960
[   29.036138][    T1]  do_initcall_level+0x140/0x350
[   29.036138][    T1]  do_initcalls+0xf0/0x1d0
[   29.036138][    T1]  do_basic_setup+0x22/0x30
[   29.036138][    T1]  kernel_init_freeable+0x300/0x4b0
[   29.036138][    T1]  kernel_init+0x2f/0x7e0
[   29.036138][    T1]  ret_from_fork+0x66/0x80
[   29.036138][    T1]  ret_from_fork_asm+0x11/0x20
[   29.036138][    T1] 
[   29.036138][    T1] Uninit was created at:
[   29.036138][    T1]  free_unref_page_prepare+0xc1/0xad0
[   29.036138][    T1]  free_unref_page+0x58/0x6d0
[   29.036138][    T1]  __free_pages+0xb1/0x1f0
[   29.036138][    T1]  thread_stack_free_rcu+0x97/0xb0
[   29.036138][    T1]  rcu_core+0xa3c/0x1df0
[   29.036138][    T1]  rcu_core_si+0x12/0x20
[   29.036138][    T1]  __do_softirq+0x1b7/0x7c3
[   29.036138][    T1] 
[   29.036138][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc2-syzkaller-g6764c317b6bb #0
[   29.036138][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
[   29.036138][    T1] =====================================================
[   29.036138][    T1] Disabling lock debugging due to kernel taint
[   29.036138][    T1] Kernel panic - not syncing: kmsan.panic set ...
[   29.036138][    T1] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G    B              6.8.0-rc2-syzkaller-g6764c317b6bb #0
[   29.036138][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
[   29.036138][    T1] Call Trace:
[   29.036138][    T1]  <TASK>
[   29.036138][    T1]  dump_stack_lvl+0x1bf/0x240
[   29.036138][    T1]  dump_stack+0x1e/0x20
[   29.036138][    T1]  panic+0x4de/0xc90
[   29.036138][    T1]  kmsan_report+0x2d0/0x2d0
[   29.036138][    T1]  ? cleanup_uevent_env+0x30/0x50
[   29.036138][    T1]  ? netdev_queue_update_kobjects+0x3f5/0x870
[   29.036138][    T1]  ? netdev_register_kobject+0x41e/0x520
[   29.036138][    T1]  ? register_netdevice+0x198f/0x2170
[   29.036138][    T1]  ? __msan_warning+0x96/0x110
[   29.036138][    T1]  ? __list_del_entry_valid_or_report+0x19e/0x490
[   29.036138][    T1]  ? stack_depot_save_flags+0x3e7/0x7b0
[   29.036138][    T1]  ? stack_depot_save+0x12/0x20
[   29.036138][    T1]  ? ref_tracker_alloc+0x215/0x700
[   29.036138][    T1]  ? netdev_hold+0xe2/0x120
[   29.036138][    T1]  ? register_netdevice+0x1bc7/0x2170
[   29.036138][    T1]  ? bond_create+0x138/0x2a0
[   29.036138][    T1]  ? bonding_init+0x1a7/0x2d0
[   29.036138][    T1]  ? do_one_initcall+0x216/0x960
[   29.036138][    T1]  ? do_initcall_level+0x140/0x350
[   29.036138][    T1]  ? do_initcalls+0xf0/0x1d0
[   29.036138][    T1]  ? do_basic_setup+0x22/0x30
[   29.036138][    T1]  ? kernel_init_freeable+0x300/0x4b0
[   29.036138][    T1]  ? kernel_init+0x2f/0x7e0
[   29.036138][    T1]  ? ret_from_fork+0x66/0x80
[   29.036138][    T1]  ? ret_from_fork_asm+0x11/0x20
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  ? filter_irq_stacks+0x60/0x1a0
[   29.036138][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  __msan_warning+0x96/0x110
[   29.036138][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
[   29.036138][    T1]  stack_depot_save_flags+0x3e7/0x7b0
[   29.036138][    T1]  stack_depot_save+0x12/0x20
[   29.036138][    T1]  ref_tracker_alloc+0x215/0x700
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? netdev_hold+0xe2/0x120
[   29.036138][    T1]  ? register_netdevice+0x1bc7/0x2170
[   29.036138][    T1]  ? bond_create+0x138/0x2a0
[   29.036138][    T1]  ? bonding_init+0x1a7/0x2d0
[   29.036138][    T1]  ? do_one_initcall+0x216/0x960
[   29.036138][    T1]  ? do_initcall_level+0x140/0x350
[   29.036138][    T1]  ? do_initcalls+0xf0/0x1d0
[   29.036138][    T1]  ? do_basic_setup+0x22/0x30
[   29.036138][    T1]  ? kernel_init_freeable+0x300/0x4b0
[   29.036138][    T1]  ? kernel_init+0x2f/0x7e0
[   29.036138][    T1]  ? ret_from_fork+0x66/0x80
[   29.036138][    T1]  ? ret_from_fork_asm+0x11/0x20
[   29.036138][    T1]  ? kmsan_internal_unpoison_memory+0x14/0x20
[   29.036138][    T1]  netdev_hold+0xe2/0x120
[   29.036138][    T1]  register_netdevice+0x1bc7/0x2170
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  bond_create+0x138/0x2a0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  bonding_init+0x1a7/0x2d0
[   29.036138][    T1]  ? spi_dln2_driver_init+0x40/0x40
[   29.036138][    T1]  do_one_initcall+0x216/0x960
[   29.036138][    T1]  ? spi_dln2_driver_init+0x40/0x40
[   29.036138][    T1]  ? kmsan_get_metadata+0x60/0x1c0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  ? filter_irq_stacks+0x60/0x1a0
[   29.036138][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
[   29.036138][    T1]  ? skip_spaces+0x8f/0xc0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  ? parse_args+0x1511/0x15e0
[   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   29.036138][    T1]  ? spi_dln2_driver_init+0x40/0x40
[   29.036138][    T1]  do_initcall_level+0x140/0x350
[   29.036138][    T1]  do_initcalls+0xf0/0x1d0
[   29.036138][    T1]  ? arch_cpuhp_init_parallel_bringup+0xe0/0xe0
[   29.036138][    T1]  do_basic_setup+0x22/0x30
[   29.036138][    T1]  kernel_init_freeable+0x300/0x4b0
[   29.036138][    T1]  ? rest_init+0x260/0x260
[   29.036138][    T1]  kernel_init+0x2f/0x7e0
[   29.036138][    T1]  ? rest_init+0x260/0x260
[   29.036138][    T1]  ret_from_fork+0x66/0x80
[   29.036138][    T1]  ? rest_init+0x260/0x260
[   29.036138][    T1]  ret_from_fork_asm+0x11/0x20
[   29.036138][    T1]  </TASK>
[   29.036138][    T1] Kernel Offset: disabled


syzkaller build log:
go env (err=<nil>)
GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/syzkaller/.cache/go-build'
GOENV='/syzkaller/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/syzkaller/jobs-2/linux/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2170902610=/tmp/go-build -gno-record-gcc-switches'

git status (err=<nil>)
HEAD detached at 373b66cd2
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:32: run command via tools/syz-env for best compatibility, see:
Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3\"


Error text is too large and was truncated, full error text is at:
https://syzkaller.appspot.com/x/error.txt?x=12b5bad3e80000


Tested on:

commit:         6764c317 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=f8b2756f2e75608e
dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-01 11:04 [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3) syzbot
  2024-02-01 12:20 ` [syzbot] " syzbot
  2024-02-01 16:17 ` Gao Xiang
@ 2024-02-01 23:30 ` syzbot
  2 siblings, 0 replies; 13+ messages in thread
From: syzbot @ 2024-02-01 23:30 UTC (permalink / raw)
  To: linux-kernel

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
Author: eadavis@qq.com

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 021be5feb1bc..8ac3f96676c4 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -252,7 +252,8 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_lz4_decompress_ctx *ctx,
 		print_hex_dump(KERN_DEBUG, "[ in]: ", DUMP_PREFIX_OFFSET,
 			       16, 1, src + inputmargin, rq->inputsize, true);
 		print_hex_dump(KERN_DEBUG, "[out]: ", DUMP_PREFIX_OFFSET,
-			       16, 1, out, rq->outputsize, true);
+			       16, 1, out, (ret < 0 && rq->inputsize > 0) ? 
+			       (ret + rq->inputsize) : rq->outputsize, true);
 
 		if (ret >= 0)
 			memset(out + ret, 0, rq->outputsize - ret);


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-01 16:57   ` syzbot
@ 2024-02-20  6:50     ` Gao Xiang
  2024-02-20  7:22       ` syzbot
  0 siblings, 1 reply; 13+ messages in thread
From: Gao Xiang @ 2024-02-20  6:50 UTC (permalink / raw)
  To: syzbot, chao, huyue2, jefflexu, linux-erofs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, xiang

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

On 2024/2/2 00:57, syzbot wrote:
> Hello,
> 
> syzbot tried to test the proposed patch but the build/boot failed:
> 
> [    T1] NFS: Registering the id_resolver key type
> [   20.847533][    T1] Key type id_resolver registered
> [   20.852991][    T1] Key type id_legacy registered
> [   20.859477][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
> [   20.868251][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
> [   20.901326][    T1] Key type cifs.spnego registered
> [   20.907727][    T1] Key type cifs.idmap registered
> [   20.917413][    T1] ntfs: driver 2.1.32 [Flags: R/W].
> [   20.923298][    T1] ntfs3: Max link count 4000
> [   20.928297][    T1] ntfs3: Enabled Linux POSIX ACLs support
> [   20.934148][    T1] ntfs3: Read-only LZX/Xpress compression included
> [   20.941172][    T1] efs: 1.0a - http://aeschi.ch.eu.org/efs/
> [   20.947393][    T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
> [   20.953397][    T1] QNX4 filesystem 0.2.3 registered.
> [   20.958982][    T1] qnx6: QNX6 filesystem 1.0.0 registered.
> [   20.965985][    T1] fuse: init (API version 7.39)
> [   20.976858][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
> [   20.985505][    T1] orangefs_init: module version upstream loaded
> [   20.993572][    T1] JFS: nTxBlock = 8192, nTxLock = 65536
> [   21.034087][    T1] SGI XFS with ACLs, security attributes, realtime, quota, no debug enabled
> [   21.051635][    T1] 9p: Installing v9fs 9p2000 file system support
> [   21.058997][    T1] NILFS version 2 loaded
> [   21.063484][    T1] befs: version: 0.9.3
> [   21.068879][    T1] ocfs2: Registered cluster interface o2cb
> [   21.075961][    T1] ocfs2: Registered cluster interface user
> [   21.083257][    T1] OCFS2 User DLM kernel interface loaded
> [   21.102750][    T1] gfs2: GFS2 installed
> [   21.142225][    T1] ceph: loaded (mds proto 32)
> [   25.265679][    T1] NET: Registered PF_ALG protocol family
> [   25.271965][    T1] xor: automatically using best checksumming function   avx
> [   25.280055][    T1] async_tx: api initialized (async)
> [   25.285498][    T1] Key type asymmetric registered
> [   25.290927][    T1] Asymmetric key parser 'x509' registered
> [   25.296825][    T1] Asymmetric key parser 'pkcs8' registered
> [   25.302732][    T1] Key type pkcs7_test registered
> [   25.308482][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 240)
> [   25.318600][    T1] io scheduler mq-deadline registered
> [   25.324054][    T1] io scheduler kyber registered
> [   25.331126][    T1] io scheduler bfq registered
> [   25.347558][    T1] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
> [   25.363347][  T136] kworker/u4:0 (136) used greatest stack depth: 11000 bytes left
> [   25.374100][    T1] ACPI: button: Power Button [PWRF]
> [   25.381760][    T1] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
> [   25.392277][    T1] ACPI: button: Sleep Button [SLPF]
> [   25.414526][    T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
> [   25.499231][    T1] ACPI: \_SB_.LNKC: Enabled at IRQ 11
> [   25.505226][    T1] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
> [   25.579195][    T1] ACPI: \_SB_.LNKD: Enabled at IRQ 10
> [   25.585070][    T1] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
> [   25.662347][    T1] ACPI: \_SB_.LNKB: Enabled at IRQ 10
> [   25.668284][    T1] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
> [   25.725221][    T1] virtio-pci 0000:00:07.0: virtio_pci: leaving for legacy driver
> [   26.750369][    T1] N_HDLC line discipline registered with maxframe=4096
> [   26.758188][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
> [   26.770021][    T1] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
> [   26.799322][    T1] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
> [   26.828884][    T1] 00:05: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A
> [   26.856640][    T1] 00:06: ttyS3 at I/O 0x2e8 (irq = 7, base_baud = 115200) is a 16550A
> [   26.903869][    T1] Non-volatile memory driver v1.3
> [   26.925949][    T1] Linux agpgart interface v0.103
> [   26.944845][    T1] ACPI: bus type drm_connector registered
> [   26.963460][    T1] [drm] Initialized vgem 1.0.0 20120112 for vgem on minor 0
> [   26.985308][    T1] [drm] Initialized vkms 1.0.0 20180514 for vkms on minor 1
> [   27.457414][    T1] Console: switching to colour frame buffer device 128x48
> [   27.612960][    T1] platform vkms: [drm] fb0: vkmsdrmfb frame buffer device
> [   27.621207][    T1] usbcore: registered new interface driver udl
> [   27.785853][    T1] brd: module loaded
> [   27.962515][    T1] loop: module loaded
> [   28.204419][    T1] zram: Added device: zram0
> [   28.227930][    T1] null_blk: disk nullb0 created
> [   28.232984][    T1] null_blk: module loaded
> [   28.238841][    T1] Guest personality initialized and is inactive
> [   28.247691][    T1] VMCI host device registered (name=vmci, major=10, minor=118)
> [   28.255558][    T1] Initialized host personality
> [   28.261000][    T1] usbcore: registered new interface driver rtsx_usb
> [   28.269847][    T1] usbcore: registered new interface driver viperboard
> [   28.277538][    T1] usbcore: registered new interface driver dln2
> [   28.284724][    T1] usbcore: registered new interface driver pn533_usb
> [   28.297696][    T1] nfcsim 0.2 initialized
> [   28.302508][    T1] usbcore: registered new interface driver port100
> [   28.309540][    T1] usbcore: registered new interface driver nfcmrvl
> [   28.325751][    T1] Loading iSCSI transport class v2.0-870.
> [   28.358008][    T1] virtio_scsi virtio0: 1/0/0 default/read/poll queues
> [   28.395519][    T1] scsi host0: Virtio SCSI HBA
> [   28.917048][    T1] st: Version 20160209, fixed bufsize 32768, s/g segs 256
> [   28.933542][   T11] scsi 0:0:1:0: Direct-Access     Google   PersistentDisk   1    PQ: 0 ANSI: 6
> [   28.978523][    T1] Rounding down aligned max_sectors from 4294967295 to 4294967288
> [   28.988652][    T1] db_root: cannot open: /etc/target
> [   29.035870][    T1] =====================================================
> [   29.036118][    T1] BUG: KMSAN: use-after-free in __list_del_entry_valid_or_report+0x19e/0x490
> [   29.036138][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
> [   29.036138][    T1]  stack_depot_save_flags+0x3e7/0x7b0
> [   29.036138][    T1]  stack_depot_save+0x12/0x20
> [   29.036138][    T1]  ref_tracker_alloc+0x215/0x700
> [   29.036138][    T1]  netdev_hold+0xe2/0x120
> [   29.036138][    T1]  register_netdevice+0x1bc7/0x2170
> [   29.036138][    T1]  bond_create+0x138/0x2a0
> [   29.036138][    T1]  bonding_init+0x1a7/0x2d0
> [   29.036138][    T1]  do_one_initcall+0x216/0x960
> [   29.036138][    T1]  do_initcall_level+0x140/0x350
> [   29.036138][    T1]  do_initcalls+0xf0/0x1d0
> [   29.036138][    T1]  do_basic_setup+0x22/0x30
> [   29.036138][    T1]  kernel_init_freeable+0x300/0x4b0
> [   29.036138][    T1]  kernel_init+0x2f/0x7e0
> [   29.036138][    T1]  ret_from_fork+0x66/0x80
> [   29.036138][    T1]  ret_from_fork_asm+0x11/0x20
> [   29.036138][    T1]
> [   29.036138][    T1] Uninit was created at:
> [   29.036138][    T1]  free_unref_page_prepare+0xc1/0xad0
> [   29.036138][    T1]  free_unref_page+0x58/0x6d0
> [   29.036138][    T1]  __free_pages+0xb1/0x1f0
> [   29.036138][    T1]  thread_stack_free_rcu+0x97/0xb0
> [   29.036138][    T1]  rcu_core+0xa3c/0x1df0
> [   29.036138][    T1]  rcu_core_si+0x12/0x20
> [   29.036138][    T1]  __do_softirq+0x1b7/0x7c3
> [   29.036138][    T1]
> [   29.036138][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc2-syzkaller-g6764c317b6bb #0
> [   29.036138][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> [   29.036138][    T1] =====================================================
> [   29.036138][    T1] Disabling lock debugging due to kernel taint
> [   29.036138][    T1] Kernel panic - not syncing: kmsan.panic set ...
> [   29.036138][    T1] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G    B              6.8.0-rc2-syzkaller-g6764c317b6bb #0
> [   29.036138][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> [   29.036138][    T1] Call Trace:
> [   29.036138][    T1]  <TASK>
> [   29.036138][    T1]  dump_stack_lvl+0x1bf/0x240
> [   29.036138][    T1]  dump_stack+0x1e/0x20
> [   29.036138][    T1]  panic+0x4de/0xc90
> [   29.036138][    T1]  kmsan_report+0x2d0/0x2d0
> [   29.036138][    T1]  ? cleanup_uevent_env+0x30/0x50
> [   29.036138][    T1]  ? netdev_queue_update_kobjects+0x3f5/0x870
> [   29.036138][    T1]  ? netdev_register_kobject+0x41e/0x520
> [   29.036138][    T1]  ? register_netdevice+0x198f/0x2170
> [   29.036138][    T1]  ? __msan_warning+0x96/0x110
> [   29.036138][    T1]  ? __list_del_entry_valid_or_report+0x19e/0x490
> [   29.036138][    T1]  ? stack_depot_save_flags+0x3e7/0x7b0
> [   29.036138][    T1]  ? stack_depot_save+0x12/0x20
> [   29.036138][    T1]  ? ref_tracker_alloc+0x215/0x700
> [   29.036138][    T1]  ? netdev_hold+0xe2/0x120
> [   29.036138][    T1]  ? register_netdevice+0x1bc7/0x2170
> [   29.036138][    T1]  ? bond_create+0x138/0x2a0
> [   29.036138][    T1]  ? bonding_init+0x1a7/0x2d0
> [   29.036138][    T1]  ? do_one_initcall+0x216/0x960
> [   29.036138][    T1]  ? do_initcall_level+0x140/0x350
> [   29.036138][    T1]  ? do_initcalls+0xf0/0x1d0
> [   29.036138][    T1]  ? do_basic_setup+0x22/0x30
> [   29.036138][    T1]  ? kernel_init_freeable+0x300/0x4b0
> [   29.036138][    T1]  ? kernel_init+0x2f/0x7e0
> [   29.036138][    T1]  ? ret_from_fork+0x66/0x80
> [   29.036138][    T1]  ? ret_from_fork_asm+0x11/0x20
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  ? filter_irq_stacks+0x60/0x1a0
> [   29.036138][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  __msan_warning+0x96/0x110
> [   29.036138][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
> [   29.036138][    T1]  stack_depot_save_flags+0x3e7/0x7b0
> [   29.036138][    T1]  stack_depot_save+0x12/0x20
> [   29.036138][    T1]  ref_tracker_alloc+0x215/0x700
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? netdev_hold+0xe2/0x120
> [   29.036138][    T1]  ? register_netdevice+0x1bc7/0x2170
> [   29.036138][    T1]  ? bond_create+0x138/0x2a0
> [   29.036138][    T1]  ? bonding_init+0x1a7/0x2d0
> [   29.036138][    T1]  ? do_one_initcall+0x216/0x960
> [   29.036138][    T1]  ? do_initcall_level+0x140/0x350
> [   29.036138][    T1]  ? do_initcalls+0xf0/0x1d0
> [   29.036138][    T1]  ? do_basic_setup+0x22/0x30
> [   29.036138][    T1]  ? kernel_init_freeable+0x300/0x4b0
> [   29.036138][    T1]  ? kernel_init+0x2f/0x7e0
> [   29.036138][    T1]  ? ret_from_fork+0x66/0x80
> [   29.036138][    T1]  ? ret_from_fork_asm+0x11/0x20
> [   29.036138][    T1]  ? kmsan_internal_unpoison_memory+0x14/0x20
> [   29.036138][    T1]  netdev_hold+0xe2/0x120
> [   29.036138][    T1]  register_netdevice+0x1bc7/0x2170
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  bond_create+0x138/0x2a0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  bonding_init+0x1a7/0x2d0
> [   29.036138][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   29.036138][    T1]  do_one_initcall+0x216/0x960
> [   29.036138][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   29.036138][    T1]  ? kmsan_get_metadata+0x60/0x1c0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  ? filter_irq_stacks+0x60/0x1a0
> [   29.036138][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
> [   29.036138][    T1]  ? skip_spaces+0x8f/0xc0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  ? parse_args+0x1511/0x15e0
> [   29.036138][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   29.036138][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   29.036138][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   29.036138][    T1]  do_initcall_level+0x140/0x350
> [   29.036138][    T1]  do_initcalls+0xf0/0x1d0
> [   29.036138][    T1]  ? arch_cpuhp_init_parallel_bringup+0xe0/0xe0
> [   29.036138][    T1]  do_basic_setup+0x22/0x30
> [   29.036138][    T1]  kernel_init_freeable+0x300/0x4b0
> [   29.036138][    T1]  ? rest_init+0x260/0x260
> [   29.036138][    T1]  kernel_init+0x2f/0x7e0
> [   29.036138][    T1]  ? rest_init+0x260/0x260
> [   29.036138][    T1]  ret_from_fork+0x66/0x80
> [   29.036138][    T1]  ? rest_init+0x260/0x260
> [   29.036138][    T1]  ret_from_fork_asm+0x11/0x20
> [   29.036138][    T1]  </TASK>
> [   29.036138][    T1] Kernel Offset: disabled
> 
> 
> syzkaller build log:
> go env (err=<nil>)
> GO111MODULE='auto'
> GOARCH='amd64'
> GOBIN=''
> GOCACHE='/syzkaller/.cache/go-build'
> GOENV='/syzkaller/.config/go/env'
> GOEXE=''
> GOEXPERIMENT=''
> GOFLAGS=''
> GOHOSTARCH='amd64'
> GOHOSTOS='linux'
> GOINSECURE=''
> GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
> GONOPROXY=''
> GONOSUMDB=''
> GOOS='linux'
> GOPATH='/syzkaller/jobs-2/linux/gopath'
> GOPRIVATE=''
> GOPROXY='https://proxy.golang.org,direct'
> GOROOT='/usr/local/go'
> GOSUMDB='sum.golang.org'
> GOTMPDIR=''
> GOTOOLCHAIN='auto'
> GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
> GOVCS=''
> GOVERSION='go1.21.4'
> GCCGO='gccgo'
> GOAMD64='v1'
> AR='ar'
> CC='gcc'
> CXX='g++'
> CGO_ENABLED='1'
> GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
> GOWORK=''
> CGO_CFLAGS='-O2 -g'
> CGO_CPPFLAGS=''
> CGO_CXXFLAGS='-O2 -g'
> CGO_FFLAGS='-O2 -g'
> CGO_LDFLAGS='-O2 -g'
> PKG_CONFIG='pkg-config'
> GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2170902610=/tmp/go-build -gno-record-gcc-switches'
> 
> git status (err=<nil>)
> HEAD detached at 373b66cd2
> nothing to commit, working tree clean
> 
> 
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> Makefile:32: run command via tools/syz-env for best compatibility, see:
> Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
> go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
> make .descriptions
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> bin/syz-sysgen
> touch .descriptions
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
> mkdir -p ./bin/linux_amd64
> gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
> 	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
> 	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3\"
> 
> 
> Error text is too large and was truncated, full error text is at:
> https://syzkaller.appspot.com/x/error.txt?x=12b5bad3e80000
> 
> 
> Tested on:
> 
> commit:         6764c317 Merge tag 'scsi-fixes' of git://git.kernel.or..
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=f8b2756f2e75608e
> dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> 
> Note: no patches were applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-20  6:50     ` Gao Xiang
@ 2024-02-20  7:22       ` syzbot
  2024-02-20  7:47         ` Gao Xiang
  2024-03-19  9:31         ` Gao Xiang
  0 siblings, 2 replies; 13+ messages in thread
From: syzbot @ 2024-02-20  7:22 UTC (permalink / raw)
  To: chao, hsiangkao, huyue2, jefflexu, linux-erofs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, xiang

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

le Layout Driver Registering...
[   21.855653][    T1] Key type cifs.spnego registered
[   21.862292][    T1] Key type cifs.idmap registered
[   21.872039][    T1] ntfs: driver 2.1.32 [Flags: R/W].
[   21.878069][    T1] ntfs3: Max link count 4000
[   21.882711][    T1] ntfs3: Enabled Linux POSIX ACLs support
[   21.888528][    T1] ntfs3: Read-only LZX/Xpress compression included
[   21.895581][    T1] efs: 1.0a - http://aeschi.ch.eu.org/efs/
[   21.902312][    T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
[   21.908626][    T1] QNX4 filesystem 0.2.3 registered.
[   21.914220][    T1] qnx6: QNX6 filesystem 1.0.0 registered.
[   21.921782][    T1] fuse: init (API version 7.39)
[   21.933923][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[   21.943462][    T1] orangefs_init: module version upstream loaded
[   21.951611][    T1] JFS: nTxBlock = 8192, nTxLock = 65536
[   21.993328][    T1] SGI XFS with ACLs, security attributes, realtime, quota, no debug enabled
[   22.010587][    T1] 9p: Installing v9fs 9p2000 file system support
[   22.019170][    T1] NILFS version 2 loaded
[   22.023764][    T1] befs: version: 0.9.3
[   22.029409][    T1] ocfs2: Registered cluster interface o2cb
[   22.037323][    T1] ocfs2: Registered cluster interface user
[   22.046089][    T1] OCFS2 User DLM kernel interface loaded
[   22.066046][    T1] gfs2: GFS2 installed
[   22.107156][    T1] ceph: loaded (mds proto 32)
[   26.347423][    T1] NET: Registered PF_ALG protocol family
[   26.353728][    T1] xor: automatically using best checksumming function   avx       
[   26.361905][    T1] async_tx: api initialized (async)
[   26.367588][    T1] Key type asymmetric registered
[   26.372680][    T1] Asymmetric key parser 'x509' registered
[   26.378760][    T1] Asymmetric key parser 'pkcs8' registered
[   26.385472][    T1] Key type pkcs7_test registered
[   26.391779][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 240)
[   26.402387][    T1] io scheduler mq-deadline registered
[   26.408181][    T1] io scheduler kyber registered
[   26.413686][    T1] io scheduler bfq registered
[   26.431031][    T1] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[   26.451191][    T1] ACPI: button: Power Button [PWRF]
[   26.459719][    T1] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
[   26.470238][    T1] ACPI: button: Sleep Button [SLPF]
[   26.470487][  T145] kworker/u4:6 (145) used greatest stack depth: 11288 bytes left
[   26.501185][    T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
[   26.590018][    T1] ACPI: \_SB_.LNKC: Enabled at IRQ 11
[   26.596923][    T1] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
[   26.684933][    T1] ACPI: \_SB_.LNKD: Enabled at IRQ 10
[   26.691887][    T1] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
[   26.769222][    T1] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[   26.775072][    T1] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
[   26.834501][    T1] virtio-pci 0000:00:07.0: virtio_pci: leaving for legacy driver
[   26.964774][  T227] kworker/u4:4 (227) used greatest stack depth: 11000 bytes left
[   27.025559][  T254] kworker/u4:4 (254) used greatest stack depth: 10880 bytes left
[   27.967136][    T1] N_HDLC line discipline registered with maxframe=4096
[   27.975904][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[   27.992699][    T1] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[   28.026200][    T1] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[   28.059406][    T1] 00:05: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A
[   28.089449][    T1] 00:06: ttyS3 at I/O 0x2e8 (irq = 7, base_baud = 115200) is a 16550A
[   28.140541][    T1] Non-volatile memory driver v1.3
[   28.170442][    T1] Linux agpgart interface v0.103
[   28.189648][    T1] ACPI: bus type drm_connector registered
[   28.207115][    T1] [drm] Initialized vgem 1.0.0 20120112 for vgem on minor 0
[   28.229973][    T1] [drm] Initialized vkms 1.0.0 20180514 for vkms on minor 1
[   28.724393][    T1] Console: switching to colour frame buffer device 128x48
[   28.875767][    T1] platform vkms: [drm] fb0: vkmsdrmfb frame buffer device
[   28.884404][    T1] usbcore: registered new interface driver udl
[   29.061297][    T1] brd: module loaded
[   29.244400][    T1] loop: module loaded
[   29.512400][    T1] zram: Added device: zram0
[   29.540501][    T1] null_blk: disk nullb0 created
[   29.545733][    T1] null_blk: module loaded
[   29.551941][    T1] Guest personality initialized and is inactive
[   29.560955][    T1] VMCI host device registered (name=vmci, major=10, minor=118)
[   29.569840][    T1] Initialized host personality
[   29.575750][    T1] usbcore: registered new interface driver rtsx_usb
[   29.585633][    T1] usbcore: registered new interface driver viperboard
[   29.594432][    T1] usbcore: registered new interface driver dln2
[   29.602202][    T1] usbcore: registered new interface driver pn533_usb
[   29.616932][    T1] nfcsim 0.2 initialized
[   29.622086][    T1] usbcore: registered new interface driver port100
[   29.629914][    T1] usbcore: registered new interface driver nfcmrvl
[   29.648231][    T1] Loading iSCSI transport class v2.0-870.
[   29.684669][    T1] virtio_scsi virtio0: 1/0/0 default/read/poll queues
[   29.731303][    T1] scsi host0: Virtio SCSI HBA
[   30.283396][    T1] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[   30.301725][   T72] scsi 0:0:1:0: Direct-Access     Google   PersistentDisk   1    PQ: 0 ANSI: 6
[   30.344813][    T1] Rounding down aligned max_sectors from 4294967295 to 4294967288
[   30.362347][    T1] db_root: cannot open: /etc/target
[   30.395006][    T1] =====================================================
[   30.395260][    T1] BUG: KMSAN: use-after-free in __list_del_entry_valid_or_report+0x19e/0x490
[   30.395432][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
[   30.395596][    T1]  stack_depot_save_flags+0x3e7/0x7b0
[   30.395700][    T1]  stack_depot_save+0x12/0x20
[   30.395793][    T1]  ref_tracker_alloc+0x215/0x700
[   30.395890][    T1]  netdev_queue_update_kobjects+0x256/0x870
[   30.396031][    T1]  netdev_register_kobject+0x41e/0x520
[   30.396149][    T1]  register_netdevice+0x198f/0x2170
[   30.396264][    T1]  bond_create+0x138/0x2a0
[   30.396406][    T1]  bonding_init+0x1a7/0x2d0
[   30.396505][    T1]  do_one_initcall+0x216/0x960
[   30.396640][    T1]  do_initcall_level+0x140/0x350
[   30.396748][    T1]  do_initcalls+0xf0/0x1d0
[   30.396848][    T1]  do_basic_setup+0x22/0x30
[   30.396959][    T1]  kernel_init_freeable+0x300/0x4b0
[   30.397071][    T1]  kernel_init+0x2f/0x7e0
[   30.397189][    T1]  ret_from_fork+0x66/0x80
[   30.397216][    T1]  ret_from_fork_asm+0x11/0x20
[   30.397216][    T1] 
[   30.397216][    T1] Uninit was created at:
[   30.397216][    T1]  free_unref_page_prepare+0xc1/0xad0
[   30.397216][    T1]  free_unref_page+0x58/0x6d0
[   30.397216][    T1]  __free_pages+0xb1/0x1f0
[   30.397216][    T1]  thread_stack_free_rcu+0x97/0xb0
[   30.397216][    T1]  rcu_core+0xa3c/0x1df0
[   30.397216][    T1]  rcu_core_si+0x12/0x20
[   30.397216][    T1]  __do_softirq+0x1b7/0x7c3
[   30.397216][    T1] 
[   30.397216][    T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc5-syzkaller-gb401b621758e #0
[   30.397216][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
[   30.397216][    T1] =====================================================
[   30.397216][    T1] Disabling lock debugging due to kernel taint
[   30.397216][    T1] Kernel panic - not syncing: kmsan.panic set ...
[   30.397216][    T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G    B              6.8.0-rc5-syzkaller-gb401b621758e #0
[   30.397216][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
[   30.397216][    T1] Call Trace:
[   30.397216][    T1]  <TASK>
[   30.397216][    T1]  dump_stack_lvl+0x1bf/0x240
[   30.397216][    T1]  dump_stack+0x1e/0x20
[   30.397216][    T1]  panic+0x4de/0xc90
[   30.397216][    T1]  kmsan_report+0x2d0/0x2d0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? __msan_warning+0x96/0x110
[   30.397216][    T1]  ? __list_del_entry_valid_or_report+0x19e/0x490
[   30.397216][    T1]  ? stack_depot_save_flags+0x3e7/0x7b0
[   30.397216][    T1]  ? stack_depot_save+0x12/0x20
[   30.397216][    T1]  ? ref_tracker_alloc+0x215/0x700
[   30.397216][    T1]  ? netdev_queue_update_kobjects+0x256/0x870
[   30.397216][    T1]  ? netdev_register_kobject+0x41e/0x520
[   30.397216][    T1]  ? register_netdevice+0x198f/0x2170
[   30.397216][    T1]  ? bond_create+0x138/0x2a0
[   30.397216][    T1]  ? bonding_init+0x1a7/0x2d0
[   30.397216][    T1]  ? do_one_initcall+0x216/0x960
[   30.397216][    T1]  ? do_initcall_level+0x140/0x350
[   30.397216][    T1]  ? do_initcalls+0xf0/0x1d0
[   30.397216][    T1]  ? do_basic_setup+0x22/0x30
[   30.397216][    T1]  ? kernel_init_freeable+0x300/0x4b0
[   30.397216][    T1]  ? kernel_init+0x2f/0x7e0
[   30.397216][    T1]  ? ret_from_fork+0x66/0x80
[   30.397216][    T1]  ? ret_from_fork_asm+0x11/0x20
[   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.397216][    T1]  ? _raw_spin_lock_irqsave+0x35/0xc0
[   30.397216][    T1]  ? filter_irq_stacks+0x60/0x1a0
[   30.397216][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.397216][    T1]  __msan_warning+0x96/0x110
[   30.397216][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
[   30.397216][    T1]  stack_depot_save_flags+0x3e7/0x7b0
[   30.397216][    T1]  stack_depot_save+0x12/0x20
[   30.397216][    T1]  ref_tracker_alloc+0x215/0x700
[   30.397216][    T1]  ? netdev_queue_update_kobjects+0x256/0x870
[   30.397216][    T1]  ? netdev_register_kobject+0x41e/0x520
[   30.397216][    T1]  ? register_netdevice+0x198f/0x2170
[   30.397216][    T1]  ? bond_create+0x138/0x2a0
[   30.397216][    T1]  ? bonding_init+0x1a7/0x2d0
[   30.397216][    T1]  ? do_one_initcall+0x216/0x960
[   30.397216][    T1]  ? do_initcall_level+0x140/0x350
[   30.397216][    T1]  ? do_initcalls+0xf0/0x1d0
[   30.397216][    T1]  ? do_basic_setup+0x22/0x30
[   30.397216][    T1]  ? kernel_init_freeable+0x300/0x4b0
[   30.397216][    T1]  ? kernel_init+0x2f/0x7e0
[   30.397216][    T1]  ? ret_from_fork+0x66/0x80
[   30.397216][    T1]  ? ret_from_fork_asm+0x11/0x20
[   30.397216][    T1]  ? kmsan_internal_unpoison_memory+0x14/0x20
[   30.397216][    T1]  netdev_queue_update_kobjects+0x256/0x870
[   30.397216][    T1]  netdev_register_kobject+0x41e/0x520
[   30.397216][    T1]  register_netdevice+0x198f/0x2170
[   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.397216][    T1]  bond_create+0x138/0x2a0
[   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.397216][    T1]  bonding_init+0x1a7/0x2d0
[   30.397216][    T1]  ? spi_dln2_driver_init+0x40/0x40
[   30.397216][    T1]  do_one_initcall+0x216/0x960
[   30.397216][    T1]  ? spi_dln2_driver_init+0x40/0x40
[   30.397216][    T1]  ? kmsan_get_metadata+0xb0/0x1c0
[   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.397216][    T1]  ? filter_irq_stacks+0x60/0x1a0
[   30.397216][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
[   30.407722][    T1]  ? skip_spaces+0x8f/0xc0
[   30.407722][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.407922][    T1]  ? parse_args+0x1511/0x15e0
[   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
[   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
[   30.407922][    T1]  ? spi_dln2_driver_init+0x40/0x40
[   30.408958][    T1]  do_initcall_level+0x140/0x350
[   30.408958][    T1]  do_initcalls+0xf0/0x1d0
[   30.408958][    T1]  ? arch_cpuhp_init_parallel_bringup+0xe0/0xe0
[   30.408958][    T1]  do_basic_setup+0x22/0x30
[   30.408958][    T1]  kernel_init_freeable+0x300/0x4b0
[   30.408958][    T1]  ? rest_init+0x260/0x260
[   30.408958][    T1]  kernel_init+0x2f/0x7e0
[   30.408958][    T1]  ? rest_init+0x260/0x260
[   30.408958][    T1]  ret_from_fork+0x66/0x80
[   30.409978][    T1]  ? rest_init+0x260/0x260
[   30.409978][    T1]  ret_from_fork_asm+0x11/0x20
[   30.409978][    T1]  </TASK>
[   30.409978][    T1] Kernel Offset: disabled


syzkaller build log:
go env (err=<nil>)
GO111MODULE='auto'
GOARCH='amd64'
GOBIN=''
GOCACHE='/syzkaller/.cache/go-build'
GOENV='/syzkaller/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/syzkaller/jobs-2/linux/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1804868575=/tmp/go-build -gno-record-gcc-switches'

git status (err=<nil>)
HEAD detached at 373b66cd2
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:32: run command via tools/syz-env for best compatibility, see:
Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3\"


Error text is too large and was truncated, full error text is at:
https://syzkaller.appspot.com/x/error.txt?x=12579b34180000


Tested on:

commit:         b401b621 Linux 6.8-rc5
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=d33318d4e4a0d226
dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-20  7:22       ` syzbot
@ 2024-02-20  7:47         ` Gao Xiang
  2024-03-19  9:31         ` Gao Xiang
  1 sibling, 0 replies; 13+ messages in thread
From: Gao Xiang @ 2024-02-20  7:47 UTC (permalink / raw)
  To: syzbot, chao, huyue2, jefflexu, linux-erofs, linux-fsdevel,
	linux-kernel, syzkaller-bugs, xiang, netdev

(+add -netdev)

On 2024/2/20 15:22, syzbot wrote:
> Hello,
> 
> syzbot tried to test the proposed patch but the build/boot failed:
> 
> le Layout Driver Registering...

...

> [   29.540501][    T1] null_blk: disk nullb0 created
> [   29.545733][    T1] null_blk: module loaded
> [   29.551941][    T1] Guest personality initialized and is inactive
> [   29.560955][    T1] VMCI host device registered (name=vmci, major=10, minor=118)
> [   29.569840][    T1] Initialized host personality
> [   29.575750][    T1] usbcore: registered new interface driver rtsx_usb
> [   29.585633][    T1] usbcore: registered new interface driver viperboard
> [   29.594432][    T1] usbcore: registered new interface driver dln2
> [   29.602202][    T1] usbcore: registered new interface driver pn533_usb
> [   29.616932][    T1] nfcsim 0.2 initialized
> [   29.622086][    T1] usbcore: registered new interface driver port100
> [   29.629914][    T1] usbcore: registered new interface driver nfcmrvl
> [   29.648231][    T1] Loading iSCSI transport class v2.0-870.
> [   29.684669][    T1] virtio_scsi virtio0: 1/0/0 default/read/poll queues
> [   29.731303][    T1] scsi host0: Virtio SCSI HBA
> [   30.283396][    T1] st: Version 20160209, fixed bufsize 32768, s/g segs 256
> [   30.301725][   T72] scsi 0:0:1:0: Direct-Access     Google   PersistentDisk   1    PQ: 0 ANSI: 6
> [   30.344813][    T1] Rounding down aligned max_sectors from 4294967295 to 4294967288
> [   30.362347][    T1] db_root: cannot open: /etc/target
> [   30.395006][    T1] =====================================================
> [   30.395260][    T1] BUG: KMSAN: use-after-free in __list_del_entry_valid_or_report+0x19e/0x490
> [   30.395432][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
> [   30.395596][    T1]  stack_depot_save_flags+0x3e7/0x7b0
> [   30.395700][    T1]  stack_depot_save+0x12/0x20
> [   30.395793][    T1]  ref_tracker_alloc+0x215/0x700
> [   30.395890][    T1]  netdev_queue_update_kobjects+0x256/0x870
> [   30.396031][    T1]  netdev_register_kobject+0x41e/0x520

It seems it got some similar boot-failure issue:
https://lore.kernel.org/r/00000000000036e27e0610890a65@google.com
https://lore.kernel.org/r/000000000000bacd1706107232cd@google.com

before I tend to verify a resolved duplicated report:
https://syzkaller.appspot.com/bug?extid=6c746eea496f34b3161d

Thanks,
Gao Xiang

> [   30.396149][    T1]  register_netdevice+0x198f/0x2170
> [   30.396264][    T1]  bond_create+0x138/0x2a0
> [   30.396406][    T1]  bonding_init+0x1a7/0x2d0
> [   30.396505][    T1]  do_one_initcall+0x216/0x960
> [   30.396640][    T1]  do_initcall_level+0x140/0x350
> [   30.396748][    T1]  do_initcalls+0xf0/0x1d0
> [   30.396848][    T1]  do_basic_setup+0x22/0x30
> [   30.396959][    T1]  kernel_init_freeable+0x300/0x4b0
> [   30.397071][    T1]  kernel_init+0x2f/0x7e0
> [   30.397189][    T1]  ret_from_fork+0x66/0x80
> [   30.397216][    T1]  ret_from_fork_asm+0x11/0x20
> [   30.397216][    T1]
> [   30.397216][    T1] Uninit was created at:
> [   30.397216][    T1]  free_unref_page_prepare+0xc1/0xad0
> [   30.397216][    T1]  free_unref_page+0x58/0x6d0
> [   30.397216][    T1]  __free_pages+0xb1/0x1f0
> [   30.397216][    T1]  thread_stack_free_rcu+0x97/0xb0
> [   30.397216][    T1]  rcu_core+0xa3c/0x1df0
> [   30.397216][    T1]  rcu_core_si+0x12/0x20
> [   30.397216][    T1]  __do_softirq+0x1b7/0x7c3
> [   30.397216][    T1]
> [   30.397216][    T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc5-syzkaller-gb401b621758e #0
> [   30.397216][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> [   30.397216][    T1] =====================================================
> [   30.397216][    T1] Disabling lock debugging due to kernel taint
> [   30.397216][    T1] Kernel panic - not syncing: kmsan.panic set ...
> [   30.397216][    T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G    B              6.8.0-rc5-syzkaller-gb401b621758e #0
> [   30.397216][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> [   30.397216][    T1] Call Trace:
> [   30.397216][    T1]  <TASK>
> [   30.397216][    T1]  dump_stack_lvl+0x1bf/0x240
> [   30.397216][    T1]  dump_stack+0x1e/0x20
> [   30.397216][    T1]  panic+0x4de/0xc90
> [   30.397216][    T1]  kmsan_report+0x2d0/0x2d0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? __msan_warning+0x96/0x110
> [   30.397216][    T1]  ? __list_del_entry_valid_or_report+0x19e/0x490
> [   30.397216][    T1]  ? stack_depot_save_flags+0x3e7/0x7b0
> [   30.397216][    T1]  ? stack_depot_save+0x12/0x20
> [   30.397216][    T1]  ? ref_tracker_alloc+0x215/0x700
> [   30.397216][    T1]  ? netdev_queue_update_kobjects+0x256/0x870
> [   30.397216][    T1]  ? netdev_register_kobject+0x41e/0x520
> [   30.397216][    T1]  ? register_netdevice+0x198f/0x2170
> [   30.397216][    T1]  ? bond_create+0x138/0x2a0
> [   30.397216][    T1]  ? bonding_init+0x1a7/0x2d0
> [   30.397216][    T1]  ? do_one_initcall+0x216/0x960
> [   30.397216][    T1]  ? do_initcall_level+0x140/0x350
> [   30.397216][    T1]  ? do_initcalls+0xf0/0x1d0
> [   30.397216][    T1]  ? do_basic_setup+0x22/0x30
> [   30.397216][    T1]  ? kernel_init_freeable+0x300/0x4b0
> [   30.397216][    T1]  ? kernel_init+0x2f/0x7e0
> [   30.397216][    T1]  ? ret_from_fork+0x66/0x80
> [   30.397216][    T1]  ? ret_from_fork_asm+0x11/0x20
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  ? _raw_spin_lock_irqsave+0x35/0xc0
> [   30.397216][    T1]  ? filter_irq_stacks+0x60/0x1a0
> [   30.397216][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  __msan_warning+0x96/0x110
> [   30.397216][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
> [   30.397216][    T1]  stack_depot_save_flags+0x3e7/0x7b0
> [   30.397216][    T1]  stack_depot_save+0x12/0x20
> [   30.397216][    T1]  ref_tracker_alloc+0x215/0x700
> [   30.397216][    T1]  ? netdev_queue_update_kobjects+0x256/0x870
> [   30.397216][    T1]  ? netdev_register_kobject+0x41e/0x520
> [   30.397216][    T1]  ? register_netdevice+0x198f/0x2170
> [   30.397216][    T1]  ? bond_create+0x138/0x2a0
> [   30.397216][    T1]  ? bonding_init+0x1a7/0x2d0
> [   30.397216][    T1]  ? do_one_initcall+0x216/0x960
> [   30.397216][    T1]  ? do_initcall_level+0x140/0x350
> [   30.397216][    T1]  ? do_initcalls+0xf0/0x1d0
> [   30.397216][    T1]  ? do_basic_setup+0x22/0x30
> [   30.397216][    T1]  ? kernel_init_freeable+0x300/0x4b0
> [   30.397216][    T1]  ? kernel_init+0x2f/0x7e0
> [   30.397216][    T1]  ? ret_from_fork+0x66/0x80
> [   30.397216][    T1]  ? ret_from_fork_asm+0x11/0x20
> [   30.397216][    T1]  ? kmsan_internal_unpoison_memory+0x14/0x20
> [   30.397216][    T1]  netdev_queue_update_kobjects+0x256/0x870
> [   30.397216][    T1]  netdev_register_kobject+0x41e/0x520
> [   30.397216][    T1]  register_netdevice+0x198f/0x2170
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  bond_create+0x138/0x2a0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  bonding_init+0x1a7/0x2d0
> [   30.397216][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   30.397216][    T1]  do_one_initcall+0x216/0x960
> [   30.397216][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   30.397216][    T1]  ? kmsan_get_metadata+0xb0/0x1c0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  ? filter_irq_stacks+0x60/0x1a0
> [   30.397216][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
> [   30.407722][    T1]  ? skip_spaces+0x8f/0xc0
> [   30.407722][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.407922][    T1]  ? parse_args+0x1511/0x15e0
> [   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.407922][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   30.408958][    T1]  do_initcall_level+0x140/0x350
> [   30.408958][    T1]  do_initcalls+0xf0/0x1d0
> [   30.408958][    T1]  ? arch_cpuhp_init_parallel_bringup+0xe0/0xe0
> [   30.408958][    T1]  do_basic_setup+0x22/0x30
> [   30.408958][    T1]  kernel_init_freeable+0x300/0x4b0
> [   30.408958][    T1]  ? rest_init+0x260/0x260
> [   30.408958][    T1]  kernel_init+0x2f/0x7e0
> [   30.408958][    T1]  ? rest_init+0x260/0x260
> [   30.408958][    T1]  ret_from_fork+0x66/0x80
> [   30.409978][    T1]  ? rest_init+0x260/0x260
> [   30.409978][    T1]  ret_from_fork_asm+0x11/0x20
> [   30.409978][    T1]  </TASK>
> [   30.409978][    T1] Kernel Offset: disabled
> 
> 
> syzkaller build log:
> go env (err=<nil>)
> GO111MODULE='auto'
> GOARCH='amd64'
> GOBIN=''
> GOCACHE='/syzkaller/.cache/go-build'
> GOENV='/syzkaller/.config/go/env'
> GOEXE=''
> GOEXPERIMENT=''
> GOFLAGS=''
> GOHOSTARCH='amd64'
> GOHOSTOS='linux'
> GOINSECURE=''
> GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
> GONOPROXY=''
> GONOSUMDB=''
> GOOS='linux'
> GOPATH='/syzkaller/jobs-2/linux/gopath'
> GOPRIVATE=''
> GOPROXY='https://proxy.golang.org,direct'
> GOROOT='/usr/local/go'
> GOSUMDB='sum.golang.org'
> GOTMPDIR=''
> GOTOOLCHAIN='auto'
> GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
> GOVCS=''
> GOVERSION='go1.21.4'
> GCCGO='gccgo'
> GOAMD64='v1'
> AR='ar'
> CC='gcc'
> CXX='g++'
> CGO_ENABLED='1'
> GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
> GOWORK=''
> CGO_CFLAGS='-O2 -g'
> CGO_CPPFLAGS=''
> CGO_CXXFLAGS='-O2 -g'
> CGO_FFLAGS='-O2 -g'
> CGO_LDFLAGS='-O2 -g'
> PKG_CONFIG='pkg-config'
> GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1804868575=/tmp/go-build -gno-record-gcc-switches'
> 
> git status (err=<nil>)
> HEAD detached at 373b66cd2
> nothing to commit, working tree clean
> 
> 
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> Makefile:32: run command via tools/syz-env for best compatibility, see:
> Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
> go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
> make .descriptions
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> bin/syz-sysgen
> touch .descriptions
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
> mkdir -p ./bin/linux_amd64
> gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
> 	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
> 	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3\"
> 
> 
> Error text is too large and was truncated, full error text is at:
> https://syzkaller.appspot.com/x/error.txt?x=12579b34180000
> 
> 
> Tested on:
> 
> commit:         b401b621 Linux 6.8-rc5
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d33318d4e4a0d226
> dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> 
> Note: no patches were applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-02-20  7:22       ` syzbot
  2024-02-20  7:47         ` Gao Xiang
@ 2024-03-19  9:31         ` Gao Xiang
  2024-03-19 10:17           ` syzbot
  1 sibling, 1 reply; 13+ messages in thread
From: Gao Xiang @ 2024-03-19  9:31 UTC (permalink / raw)
  To: syzbot, linux-erofs, linux-kernel, syzkaller-bugs, xiang

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

another try with the current upstream.

On 2024/2/20 15:22, syzbot wrote:
> Hello,
> 
> syzbot tried to test the proposed patch but the build/boot failed:
> 
> le Layout Driver Registering...
> [   21.855653][    T1] Key type cifs.spnego registered
> [   21.862292][    T1] Key type cifs.idmap registered
> [   21.872039][    T1] ntfs: driver 2.1.32 [Flags: R/W].
> [   21.878069][    T1] ntfs3: Max link count 4000
> [   21.882711][    T1] ntfs3: Enabled Linux POSIX ACLs support
> [   21.888528][    T1] ntfs3: Read-only LZX/Xpress compression included
> [   21.895581][    T1] efs: 1.0a - http://aeschi.ch.eu.org/efs/
> [   21.902312][    T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
> [   21.908626][    T1] QNX4 filesystem 0.2.3 registered.
> [   21.914220][    T1] qnx6: QNX6 filesystem 1.0.0 registered.
> [   21.921782][    T1] fuse: init (API version 7.39)
> [   21.933923][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
> [   21.943462][    T1] orangefs_init: module version upstream loaded
> [   21.951611][    T1] JFS: nTxBlock = 8192, nTxLock = 65536
> [   21.993328][    T1] SGI XFS with ACLs, security attributes, realtime, quota, no debug enabled
> [   22.010587][    T1] 9p: Installing v9fs 9p2000 file system support
> [   22.019170][    T1] NILFS version 2 loaded
> [   22.023764][    T1] befs: version: 0.9.3
> [   22.029409][    T1] ocfs2: Registered cluster interface o2cb
> [   22.037323][    T1] ocfs2: Registered cluster interface user
> [   22.046089][    T1] OCFS2 User DLM kernel interface loaded
> [   22.066046][    T1] gfs2: GFS2 installed
> [   22.107156][    T1] ceph: loaded (mds proto 32)
> [   26.347423][    T1] NET: Registered PF_ALG protocol family
> [   26.353728][    T1] xor: automatically using best checksumming function   avx
> [   26.361905][    T1] async_tx: api initialized (async)
> [   26.367588][    T1] Key type asymmetric registered
> [   26.372680][    T1] Asymmetric key parser 'x509' registered
> [   26.378760][    T1] Asymmetric key parser 'pkcs8' registered
> [   26.385472][    T1] Key type pkcs7_test registered
> [   26.391779][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 240)
> [   26.402387][    T1] io scheduler mq-deadline registered
> [   26.408181][    T1] io scheduler kyber registered
> [   26.413686][    T1] io scheduler bfq registered
> [   26.431031][    T1] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
> [   26.451191][    T1] ACPI: button: Power Button [PWRF]
> [   26.459719][    T1] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
> [   26.470238][    T1] ACPI: button: Sleep Button [SLPF]
> [   26.470487][  T145] kworker/u4:6 (145) used greatest stack depth: 11288 bytes left
> [   26.501185][    T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
> [   26.590018][    T1] ACPI: \_SB_.LNKC: Enabled at IRQ 11
> [   26.596923][    T1] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
> [   26.684933][    T1] ACPI: \_SB_.LNKD: Enabled at IRQ 10
> [   26.691887][    T1] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
> [   26.769222][    T1] ACPI: \_SB_.LNKB: Enabled at IRQ 10
> [   26.775072][    T1] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
> [   26.834501][    T1] virtio-pci 0000:00:07.0: virtio_pci: leaving for legacy driver
> [   26.964774][  T227] kworker/u4:4 (227) used greatest stack depth: 11000 bytes left
> [   27.025559][  T254] kworker/u4:4 (254) used greatest stack depth: 10880 bytes left
> [   27.967136][    T1] N_HDLC line discipline registered with maxframe=4096
> [   27.975904][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
> [   27.992699][    T1] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
> [   28.026200][    T1] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
> [   28.059406][    T1] 00:05: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A
> [   28.089449][    T1] 00:06: ttyS3 at I/O 0x2e8 (irq = 7, base_baud = 115200) is a 16550A
> [   28.140541][    T1] Non-volatile memory driver v1.3
> [   28.170442][    T1] Linux agpgart interface v0.103
> [   28.189648][    T1] ACPI: bus type drm_connector registered
> [   28.207115][    T1] [drm] Initialized vgem 1.0.0 20120112 for vgem on minor 0
> [   28.229973][    T1] [drm] Initialized vkms 1.0.0 20180514 for vkms on minor 1
> [   28.724393][    T1] Console: switching to colour frame buffer device 128x48
> [   28.875767][    T1] platform vkms: [drm] fb0: vkmsdrmfb frame buffer device
> [   28.884404][    T1] usbcore: registered new interface driver udl
> [   29.061297][    T1] brd: module loaded
> [   29.244400][    T1] loop: module loaded
> [   29.512400][    T1] zram: Added device: zram0
> [   29.540501][    T1] null_blk: disk nullb0 created
> [   29.545733][    T1] null_blk: module loaded
> [   29.551941][    T1] Guest personality initialized and is inactive
> [   29.560955][    T1] VMCI host device registered (name=vmci, major=10, minor=118)
> [   29.569840][    T1] Initialized host personality
> [   29.575750][    T1] usbcore: registered new interface driver rtsx_usb
> [   29.585633][    T1] usbcore: registered new interface driver viperboard
> [   29.594432][    T1] usbcore: registered new interface driver dln2
> [   29.602202][    T1] usbcore: registered new interface driver pn533_usb
> [   29.616932][    T1] nfcsim 0.2 initialized
> [   29.622086][    T1] usbcore: registered new interface driver port100
> [   29.629914][    T1] usbcore: registered new interface driver nfcmrvl
> [   29.648231][    T1] Loading iSCSI transport class v2.0-870.
> [   29.684669][    T1] virtio_scsi virtio0: 1/0/0 default/read/poll queues
> [   29.731303][    T1] scsi host0: Virtio SCSI HBA
> [   30.283396][    T1] st: Version 20160209, fixed bufsize 32768, s/g segs 256
> [   30.301725][   T72] scsi 0:0:1:0: Direct-Access     Google   PersistentDisk   1    PQ: 0 ANSI: 6
> [   30.344813][    T1] Rounding down aligned max_sectors from 4294967295 to 4294967288
> [   30.362347][    T1] db_root: cannot open: /etc/target
> [   30.395006][    T1] =====================================================
> [   30.395260][    T1] BUG: KMSAN: use-after-free in __list_del_entry_valid_or_report+0x19e/0x490
> [   30.395432][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
> [   30.395596][    T1]  stack_depot_save_flags+0x3e7/0x7b0
> [   30.395700][    T1]  stack_depot_save+0x12/0x20
> [   30.395793][    T1]  ref_tracker_alloc+0x215/0x700
> [   30.395890][    T1]  netdev_queue_update_kobjects+0x256/0x870
> [   30.396031][    T1]  netdev_register_kobject+0x41e/0x520
> [   30.396149][    T1]  register_netdevice+0x198f/0x2170
> [   30.396264][    T1]  bond_create+0x138/0x2a0
> [   30.396406][    T1]  bonding_init+0x1a7/0x2d0
> [   30.396505][    T1]  do_one_initcall+0x216/0x960
> [   30.396640][    T1]  do_initcall_level+0x140/0x350
> [   30.396748][    T1]  do_initcalls+0xf0/0x1d0
> [   30.396848][    T1]  do_basic_setup+0x22/0x30
> [   30.396959][    T1]  kernel_init_freeable+0x300/0x4b0
> [   30.397071][    T1]  kernel_init+0x2f/0x7e0
> [   30.397189][    T1]  ret_from_fork+0x66/0x80
> [   30.397216][    T1]  ret_from_fork_asm+0x11/0x20
> [   30.397216][    T1]
> [   30.397216][    T1] Uninit was created at:
> [   30.397216][    T1]  free_unref_page_prepare+0xc1/0xad0
> [   30.397216][    T1]  free_unref_page+0x58/0x6d0
> [   30.397216][    T1]  __free_pages+0xb1/0x1f0
> [   30.397216][    T1]  thread_stack_free_rcu+0x97/0xb0
> [   30.397216][    T1]  rcu_core+0xa3c/0x1df0
> [   30.397216][    T1]  rcu_core_si+0x12/0x20
> [   30.397216][    T1]  __do_softirq+0x1b7/0x7c3
> [   30.397216][    T1]
> [   30.397216][    T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc5-syzkaller-gb401b621758e #0
> [   30.397216][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> [   30.397216][    T1] =====================================================
> [   30.397216][    T1] Disabling lock debugging due to kernel taint
> [   30.397216][    T1] Kernel panic - not syncing: kmsan.panic set ...
> [   30.397216][    T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G    B              6.8.0-rc5-syzkaller-gb401b621758e #0
> [   30.397216][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> [   30.397216][    T1] Call Trace:
> [   30.397216][    T1]  <TASK>
> [   30.397216][    T1]  dump_stack_lvl+0x1bf/0x240
> [   30.397216][    T1]  dump_stack+0x1e/0x20
> [   30.397216][    T1]  panic+0x4de/0xc90
> [   30.397216][    T1]  kmsan_report+0x2d0/0x2d0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? __msan_warning+0x96/0x110
> [   30.397216][    T1]  ? __list_del_entry_valid_or_report+0x19e/0x490
> [   30.397216][    T1]  ? stack_depot_save_flags+0x3e7/0x7b0
> [   30.397216][    T1]  ? stack_depot_save+0x12/0x20
> [   30.397216][    T1]  ? ref_tracker_alloc+0x215/0x700
> [   30.397216][    T1]  ? netdev_queue_update_kobjects+0x256/0x870
> [   30.397216][    T1]  ? netdev_register_kobject+0x41e/0x520
> [   30.397216][    T1]  ? register_netdevice+0x198f/0x2170
> [   30.397216][    T1]  ? bond_create+0x138/0x2a0
> [   30.397216][    T1]  ? bonding_init+0x1a7/0x2d0
> [   30.397216][    T1]  ? do_one_initcall+0x216/0x960
> [   30.397216][    T1]  ? do_initcall_level+0x140/0x350
> [   30.397216][    T1]  ? do_initcalls+0xf0/0x1d0
> [   30.397216][    T1]  ? do_basic_setup+0x22/0x30
> [   30.397216][    T1]  ? kernel_init_freeable+0x300/0x4b0
> [   30.397216][    T1]  ? kernel_init+0x2f/0x7e0
> [   30.397216][    T1]  ? ret_from_fork+0x66/0x80
> [   30.397216][    T1]  ? ret_from_fork_asm+0x11/0x20
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  ? _raw_spin_lock_irqsave+0x35/0xc0
> [   30.397216][    T1]  ? filter_irq_stacks+0x60/0x1a0
> [   30.397216][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  __msan_warning+0x96/0x110
> [   30.397216][    T1]  __list_del_entry_valid_or_report+0x19e/0x490
> [   30.397216][    T1]  stack_depot_save_flags+0x3e7/0x7b0
> [   30.397216][    T1]  stack_depot_save+0x12/0x20
> [   30.397216][    T1]  ref_tracker_alloc+0x215/0x700
> [   30.397216][    T1]  ? netdev_queue_update_kobjects+0x256/0x870
> [   30.397216][    T1]  ? netdev_register_kobject+0x41e/0x520
> [   30.397216][    T1]  ? register_netdevice+0x198f/0x2170
> [   30.397216][    T1]  ? bond_create+0x138/0x2a0
> [   30.397216][    T1]  ? bonding_init+0x1a7/0x2d0
> [   30.397216][    T1]  ? do_one_initcall+0x216/0x960
> [   30.397216][    T1]  ? do_initcall_level+0x140/0x350
> [   30.397216][    T1]  ? do_initcalls+0xf0/0x1d0
> [   30.397216][    T1]  ? do_basic_setup+0x22/0x30
> [   30.397216][    T1]  ? kernel_init_freeable+0x300/0x4b0
> [   30.397216][    T1]  ? kernel_init+0x2f/0x7e0
> [   30.397216][    T1]  ? ret_from_fork+0x66/0x80
> [   30.397216][    T1]  ? ret_from_fork_asm+0x11/0x20
> [   30.397216][    T1]  ? kmsan_internal_unpoison_memory+0x14/0x20
> [   30.397216][    T1]  netdev_queue_update_kobjects+0x256/0x870
> [   30.397216][    T1]  netdev_register_kobject+0x41e/0x520
> [   30.397216][    T1]  register_netdevice+0x198f/0x2170
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  bond_create+0x138/0x2a0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  bonding_init+0x1a7/0x2d0
> [   30.397216][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   30.397216][    T1]  do_one_initcall+0x216/0x960
> [   30.397216][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   30.397216][    T1]  ? kmsan_get_metadata+0xb0/0x1c0
> [   30.397216][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.397216][    T1]  ? filter_irq_stacks+0x60/0x1a0
> [   30.397216][    T1]  ? stack_depot_save_flags+0x2c/0x7b0
> [   30.407722][    T1]  ? skip_spaces+0x8f/0xc0
> [   30.407722][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.407922][    T1]  ? parse_args+0x1511/0x15e0
> [   30.407922][    T1]  ? kmsan_get_metadata+0x146/0x1c0
> [   30.407922][    T1]  ? kmsan_get_shadow_origin_ptr+0x4d/0xa0
> [   30.407922][    T1]  ? spi_dln2_driver_init+0x40/0x40
> [   30.408958][    T1]  do_initcall_level+0x140/0x350
> [   30.408958][    T1]  do_initcalls+0xf0/0x1d0
> [   30.408958][    T1]  ? arch_cpuhp_init_parallel_bringup+0xe0/0xe0
> [   30.408958][    T1]  do_basic_setup+0x22/0x30
> [   30.408958][    T1]  kernel_init_freeable+0x300/0x4b0
> [   30.408958][    T1]  ? rest_init+0x260/0x260
> [   30.408958][    T1]  kernel_init+0x2f/0x7e0
> [   30.408958][    T1]  ? rest_init+0x260/0x260
> [   30.408958][    T1]  ret_from_fork+0x66/0x80
> [   30.409978][    T1]  ? rest_init+0x260/0x260
> [   30.409978][    T1]  ret_from_fork_asm+0x11/0x20
> [   30.409978][    T1]  </TASK>
> [   30.409978][    T1] Kernel Offset: disabled
> 
> 
> syzkaller build log:
> go env (err=<nil>)
> GO111MODULE='auto'
> GOARCH='amd64'
> GOBIN=''
> GOCACHE='/syzkaller/.cache/go-build'
> GOENV='/syzkaller/.config/go/env'
> GOEXE=''
> GOEXPERIMENT=''
> GOFLAGS=''
> GOHOSTARCH='amd64'
> GOHOSTOS='linux'
> GOINSECURE=''
> GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod'
> GONOPROXY=''
> GONOSUMDB=''
> GOOS='linux'
> GOPATH='/syzkaller/jobs-2/linux/gopath'
> GOPRIVATE=''
> GOPROXY='https://proxy.golang.org,direct'
> GOROOT='/usr/local/go'
> GOSUMDB='sum.golang.org'
> GOTMPDIR=''
> GOTOOLCHAIN='auto'
> GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
> GOVCS=''
> GOVERSION='go1.21.4'
> GCCGO='gccgo'
> GOAMD64='v1'
> AR='ar'
> CC='gcc'
> CXX='g++'
> CGO_ENABLED='1'
> GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod'
> GOWORK=''
> CGO_CFLAGS='-O2 -g'
> CGO_CPPFLAGS=''
> CGO_CXXFLAGS='-O2 -g'
> CGO_FFLAGS='-O2 -g'
> CGO_LDFLAGS='-O2 -g'
> PKG_CONFIG='pkg-config'
> GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1804868575=/tmp/go-build -gno-record-gcc-switches'
> 
> git status (err=<nil>)
> HEAD detached at 373b66cd2
> nothing to commit, working tree clean
> 
> 
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> Makefile:32: run command via tools/syz-env for best compatibility, see:
> Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
> go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
> make .descriptions
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> bin/syz-sysgen
> touch .descriptions
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
> GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20240130-131205'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
> mkdir -p ./bin/linux_amd64
> gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
> 	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
> 	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"373b66cd2ba1fd05c72d0bbe16141fb287fe2eb3\"
> 
> 
> Error text is too large and was truncated, full error text is at:
> https://syzkaller.appspot.com/x/error.txt?x=12579b34180000
> 
> 
> Tested on:
> 
> commit:         b401b621 Linux 6.8-rc5
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d33318d4e4a0d226
> dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> 
> Note: no patches were applied.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-03-19  9:31         ` Gao Xiang
@ 2024-03-19 10:17           ` syzbot
  2024-03-19 10:34             ` Gao Xiang
  0 siblings, 1 reply; 13+ messages in thread
From: syzbot @ 2024-03-19 10:17 UTC (permalink / raw)
  To: hsiangkao, linux-erofs, linux-kernel, syzkaller-bugs, xiang

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+88ad8b0517a9d3bb9dc8@syzkaller.appspotmail.com

Tested on:

commit:         b3603fcb Merge tag 'dlm-6.9' of git://git.kernel.org/p..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14395479180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=c0f689e0798c5101
dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
  2024-03-19 10:17           ` syzbot
@ 2024-03-19 10:34             ` Gao Xiang
  0 siblings, 0 replies; 13+ messages in thread
From: Gao Xiang @ 2024-03-19 10:34 UTC (permalink / raw)
  To: syzbot, linux-erofs, linux-kernel, syzkaller-bugs, xiang

#syz dup KMSAN: uninit-value in z_erofs_lz4_decompress (2)

On 2024/3/19 18:17, syzbot wrote:
> Hello,
> 
> syzbot has tested the proposed patch and the reproducer did not trigger any issue:
> 
> Reported-and-tested-by: syzbot+88ad8b0517a9d3bb9dc8@syzkaller.appspotmail.com
> 
> Tested on:
> 
> commit:         b3603fcb Merge tag 'dlm-6.9' of git://git.kernel.org/p..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14395479180000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=c0f689e0798c5101
> dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> 
> Note: no patches were applied.
> Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
       [not found] <tencent_91554BB11BE325DDBA70BBD9331A9EBC1B08@qq.com>
@ 2024-02-02  5:58 ` syzbot
  0 siblings, 0 replies; 13+ messages in thread
From: syzbot @ 2024-02-02  5:58 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file fs/erofs/decompressor.c
Hunk #1 FAILED at 252.
1 out of 1 hunk FAILED



Tested on:

commit:         02153319 Kconfig: Disable -Wstringop-overflow for GCC ..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
kernel config:  https://syzkaller.appspot.com/x/.config?x=656820e61b758b15
dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=15eb0838180000


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3)
       [not found] <tencent_2E074FCB8D8325A10DE7927D5D905DAF9907@qq.com>
@ 2024-02-01 13:34 ` syzbot
  0 siblings, 0 replies; 13+ messages in thread
From: syzbot @ 2024-02-01 13:34 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file fs/erofs/decompressor.c
Hunk #1 FAILED at 250.
1 out of 1 hunk FAILED



Tested on:

commit:         6764c317 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
kernel config:  https://syzkaller.appspot.com/x/.config?x=656820e61b758b15
dashboard link: https://syzkaller.appspot.com/bug?extid=88ad8b0517a9d3bb9dc8
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=12541988180000


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-19 10:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 11:04 [syzbot] [erofs?] KMSAN: uninit-value in z_erofs_lz4_decompress (3) syzbot
2024-02-01 12:20 ` [syzbot] " syzbot
2024-02-01 16:17 ` Gao Xiang
2024-02-01 16:57   ` syzbot
2024-02-20  6:50     ` Gao Xiang
2024-02-20  7:22       ` syzbot
2024-02-20  7:47         ` Gao Xiang
2024-03-19  9:31         ` Gao Xiang
2024-03-19 10:17           ` syzbot
2024-03-19 10:34             ` Gao Xiang
2024-02-01 23:30 ` [syzbot] " syzbot
     [not found] <tencent_2E074FCB8D8325A10DE7927D5D905DAF9907@qq.com>
2024-02-01 13:34 ` syzbot
     [not found] <tencent_91554BB11BE325DDBA70BBD9331A9EBC1B08@qq.com>
2024-02-02  5:58 ` syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.