syzbot


KMSAN: uninit-value in lzo1x_1_do_compress (2)

Status: upstream: reported on 2024/01/14 10:14
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+9a049ebdaacbb076e50a@syzkaller.appspotmail.com
First crash: 152d, last: 46d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [crypto?] KMSAN: uninit-value in lzo1x_1_do_compress (2) 0 (1) 2024/01/14 10:14
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in lzo1x_1_do_compress crypto 2 289d 305d 0/26 auto-obsoleted due to no activity on 2023/10/05 05:10

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in lzo1x_1_do_compress+0x19f9/0x2510 lib/lzo/lzo1x_compress.c:178
 lzo1x_1_do_compress+0x19f9/0x2510 lib/lzo/lzo1x_compress.c:178
 lzogeneric1x_1_compress+0x26a/0x11a0 lib/lzo/lzo1x_compress.c:333
 lzo1x_1_compress+0x47/0x70 lib/lzo/lzo1x_compress.c:383
 __lzo_compress crypto/lzo.c:58 [inline]
 lzo_scompress+0x98/0x180 crypto/lzo.c:79
 scomp_acomp_comp_decomp+0x4d3/0x850
 scomp_acomp_compress+0x32/0x40 crypto/scompress.c:165
 crypto_acomp_compress include/crypto/acompress.h:302 [inline]
 zswap_store+0x23fa/0x3f00 mm/zswap.c:1629
 swap_writepage+0x126/0x4c0 mm/page_io.c:198
 shmem_writepage+0x1824/0x1f70 mm/shmem.c:1518
 pageout mm/vmscan.c:654 [inline]
 shrink_folio_list+0x5617/0x7ad0 mm/vmscan.c:1316
 evict_folios+0xab3a/0xcc50 mm/vmscan.c:4521
 try_to_shrink_lruvec+0x15ac/0x1b20 mm/vmscan.c:4726
 shrink_one+0x66e/0xd70 mm/vmscan.c:4765
 shrink_many mm/vmscan.c:4828 [inline]
 lru_gen_shrink_node mm/vmscan.c:4929 [inline]
 shrink_node+0x4c15/0x58b0 mm/vmscan.c:5888
 kswapd_shrink_node mm/vmscan.c:6693 [inline]
 balance_pgdat mm/vmscan.c:6883 [inline]
 kswapd+0x1df3/0x4260 mm/vmscan.c:7143
 kthread+0x3ed/0x550 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:243

Uninit was stored to memory at:
 memcpy_dir crypto/scatterwalk.c:23 [inline]
 scatterwalk_copychunks crypto/scatterwalk.c:38 [inline]
 scatterwalk_map_and_copy+0x6dc/0x9a0 crypto/scatterwalk.c:67
 scomp_acomp_comp_decomp+0x386/0x850 crypto/scompress.c:137
 scomp_acomp_compress+0x32/0x40 crypto/scompress.c:165
 crypto_acomp_compress include/crypto/acompress.h:302 [inline]
 zswap_store+0x23fa/0x3f00 mm/zswap.c:1629
 swap_writepage+0x126/0x4c0 mm/page_io.c:198
 shmem_writepage+0x1824/0x1f70 mm/shmem.c:1518
 pageout mm/vmscan.c:654 [inline]
 shrink_folio_list+0x5617/0x7ad0 mm/vmscan.c:1316
 evict_folios+0xab3a/0xcc50 mm/vmscan.c:4521
 try_to_shrink_lruvec+0x15ac/0x1b20 mm/vmscan.c:4726
 shrink_one+0x66e/0xd70 mm/vmscan.c:4765
 shrink_many mm/vmscan.c:4828 [inline]
 lru_gen_shrink_node mm/vmscan.c:4929 [inline]
 shrink_node+0x4c15/0x58b0 mm/vmscan.c:5888
 kswapd_shrink_node mm/vmscan.c:6693 [inline]
 balance_pgdat mm/vmscan.c:6883 [inline]
 kswapd+0x1df3/0x4260 mm/vmscan.c:7143
 kthread+0x3ed/0x550 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:243

Uninit was stored to memory at:
 memcpy_from_iter lib/iov_iter.c:73 [inline]
 iterate_bvec include/linux/iov_iter.h:122 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:249 [inline]
 iterate_and_advance include/linux/iov_iter.h:271 [inline]
 __copy_from_iter lib/iov_iter.c:268 [inline]
 copy_page_from_iter_atomic+0x12f5/0x2b70 lib/iov_iter.c:500
 generic_perform_write+0x4ae/0xc40 mm/filemap.c:3938
 shmem_file_write_iter+0x2b5/0x2e0 mm/shmem.c:2893
 do_iter_readv_writev+0x655/0x7a0
 vfs_iter_write+0x455/0xd00 fs/read_write.c:895
 lo_write_bvec drivers/block/loop.c:246 [inline]
 lo_write_simple drivers/block/loop.c:267 [inline]
 do_req_filebacked drivers/block/loop.c:491 [inline]
 loop_handle_cmd drivers/block/loop.c:1909 [inline]
 loop_process_work+0x14f9/0x3430 drivers/block/loop.c:1944
 loop_rootcg_workfn+0x2b/0x30 drivers/block/loop.c:1975
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x1132/0x1f40 kernel/workqueue.c:2706
 worker_thread+0xea4/0x1560 kernel/workqueue.c:2787
 kthread+0x3ed/0x550 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:243

Uninit was stored to memory at:
 ntfs_write_bh+0x64e/0xda0 fs/ntfs3/fsntfs.c:1450
 indx_write fs/ntfs3/index.c:1027 [inline]
 indx_update_dup+0xd7d/0xf80 fs/ntfs3/index.c:2687
 ni_update_parent+0x12de/0x14a0 fs/ntfs3/frecord.c:3233
 ni_write_inode+0x1d33/0x1e20 fs/ntfs3/frecord.c:3324
 ntfs3_write_inode+0x94/0xb0 fs/ntfs3/inode.c:1040
 write_inode fs/fs-writeback.c:1473 [inline]
 __writeback_single_inode+0x845/0x12b0 fs/fs-writeback.c:1690
 writeback_sb_inodes+0xb73/0x1c00 fs/fs-writeback.c:1916
 wb_writeback+0x4a1/0xdf0 fs/fs-writeback.c:2092
 wb_do_writeback fs/fs-writeback.c:2239 [inline]
 wb_workfn+0x435/0x1810 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x1132/0x1f40 kernel/workqueue.c:2706
 worker_thread+0xea4/0x1560 kernel/workqueue.c:2787
 kthread+0x3ed/0x550 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:243

Uninit was stored to memory at:
 ntfs_read_run_nb+0x786/0x1070 fs/ntfs3/fsntfs.c:1252
 ntfs_read_bh+0x64/0xde0 fs/ntfs3/fsntfs.c:1313
 indx_read+0x44e/0x17b0 fs/ntfs3/index.c:1067
 indx_find+0xd08/0x1430 fs/ntfs3/index.c:1181
 indx_update_dup+0x607/0xf80 fs/ntfs3/index.c:2659
 ni_update_parent+0x12de/0x14a0 fs/ntfs3/frecord.c:3233
 ni_write_inode+0x1d33/0x1e20 fs/ntfs3/frecord.c:3324
 ntfs3_write_inode+0x94/0xb0 fs/ntfs3/inode.c:1040
 write_inode fs/fs-writeback.c:1473 [inline]
 __writeback_single_inode+0x845/0x12b0 fs/fs-writeback.c:1690
 writeback_sb_inodes+0xb73/0x1c00 fs/fs-writeback.c:1916
 wb_writeback+0x4a1/0xdf0 fs/fs-writeback.c:2092
 wb_do_writeback fs/fs-writeback.c:2239 [inline]
 wb_workfn+0x435/0x1810 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x1132/0x1f40 kernel/workqueue.c:2706
 worker_thread+0xea4/0x1560 kernel/workqueue.c:2787
 kthread+0x3ed/0x550 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:243

Uninit was stored to memory at:
 ntfs_write_bh+0x64e/0xda0 fs/ntfs3/fsntfs.c:1450
 indx_write fs/ntfs3/index.c:1027 [inline]
 indx_insert_into_buffer+0xd8b/0x2000 fs/ntfs3/index.c:1804
 indx_insert_entry+0xa3c/0xee0 fs/ntfs3/index.c:1981
 ntfs_create_inode+0x49b2/0x50f0 fs/ntfs3/inode.c:1671
 ntfs_atomic_open+0x90a/0xbb0 fs/ntfs3/namei.c:434
 atomic_open fs/namei.c:3363 [inline]
 lookup_open fs/namei.c:3471 [inline]
 open_last_lookups fs/namei.c:3569 [inline]
 path_openat+0x2219/0x5ad0 fs/namei.c:3799
 do_filp_open+0x20d/0x590 fs/namei.c:3829
 do_sys_openat2+0x1bf/0x2f0 fs/open.c:1404
 do_sys_open fs/open.c:1419 [inline]
 __do_sys_openat fs/open.c:1435 [inline]
 __se_sys_openat fs/open.c:1430 [inline]
 __x64_sys_openat+0x2a1/0x310 fs/open.c:1430
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Uninit was stored to memory at:
 hdr_insert_de fs/ntfs3/index.c:838 [inline]
 indx_insert_into_buffer+0xcdb/0x2000 fs/ntfs3/index.c:1800
 indx_insert_entry+0xa3c/0xee0 fs/ntfs3/index.c:1981
 ntfs_create_inode+0x49b2/0x50f0 fs/ntfs3/inode.c:1671
 ntfs_atomic_open+0x90a/0xbb0 fs/ntfs3/namei.c:434
 atomic_open fs/namei.c:3363 [inline]
 lookup_open fs/namei.c:3471 [inline]
 open_last_lookups fs/namei.c:3569 [inline]
 path_openat+0x2219/0x5ad0 fs/namei.c:3799
 do_filp_open+0x20d/0x590 fs/namei.c:3829
 do_sys_openat2+0x1bf/0x2f0 fs/open.c:1404
 do_sys_open fs/open.c:1419 [inline]
 __do_sys_openat fs/open.c:1435 [inline]
 __se_sys_openat fs/open.c:1430 [inline]
 __x64_sys_openat+0x2a1/0x310 fs/open.c:1430
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:3819 [inline]
 slab_alloc_node mm/slub.c:3860 [inline]
 kmem_cache_alloc+0x53f/0xb30 mm/slub.c:3867
 ntfs_create_inode+0x5e0/0x50f0 fs/ntfs3/inode.c:1314
 ntfs_atomic_open+0x90a/0xbb0 fs/ntfs3/namei.c:434
 atomic_open fs/namei.c:3363 [inline]
 lookup_open fs/namei.c:3471 [inline]
 open_last_lookups fs/namei.c:3569 [inline]
 path_openat+0x2219/0x5ad0 fs/namei.c:3799
 do_filp_open+0x20d/0x590 fs/namei.c:3829
 do_sys_openat2+0x1bf/0x2f0 fs/open.c:1404
 do_sys_open fs/open.c:1419 [inline]
 __do_sys_openat fs/open.c:1435 [inline]
 __se_sys_openat fs/open.c:1430 [inline]
 __x64_sys_openat+0x2a1/0x310 fs/open.c:1430
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

CPU: 1 PID: 78 Comm: kswapd0 Not tainted 6.8.0-rc7-syzkaller-00017-g29cd507cbec2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
=====================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/06 03:44 upstream 29cd507cbec2 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in lzo1x_1_do_compress
2024/02/26 19:13 upstream d206a76d7d27 edd6a5e9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in lzo1x_1_do_compress
2024/02/22 14:55 upstream 39133352cbed 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in lzo1x_1_do_compress
2024/01/04 12:35 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in lzo1x_1_do_compress
2023/12/05 20:12 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in lzo1x_1_do_compress
2023/11/21 00:46 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in lzo1x_1_do_compress
* Struck through repros no longer work on HEAD.