syzbot


KMSAN: uninit-value in udf_evict_inode

Status: fixed on 2020/11/16 12:12
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+91f02b28f9bb5f5f1341@syzkaller.appspotmail.com
Fix commit: 044e2e26f214 udf: Avoid accessing uninitialized data on failed inode read
First crash: 1342d, last: 1290d
Discussions (16)
Title Replies (including bot) Last reply
[PATCH 5.9 000/757] 5.9.2-rc1 review 766 (766) 2020/10/30 08:32
[PATCH 4.19 000/264] 4.19.153-rc1 review 275 (275) 2020/10/29 08:56
[PATCH 5.8 000/633] 5.8.17-rc1 review 638 (638) 2020/10/28 22:08
[PATCH 4.4 000/112] 4.4.241-rc1 review 115 (115) 2020/10/28 15:54
[PATCH 4.9 000/139] 4.9.241-rc1 review 141 (141) 2020/10/28 13:53
[PATCH 4.14 000/191] 4.14.203-rc1 review 194 (194) 2020/10/28 12:43
[PATCH 5.4 000/408] 5.4.73-rc1 review 410 (410) 2020/10/28 06:53
[PATCH AUTOSEL 5.9 001/111] md/bitmap: fix memory leak of temporary bitmap 126 (126) 2020/10/25 23:48
[PATCH AUTOSEL 4.4 01/33] media: firewire: fix memory leak 33 (33) 2020/10/18 19:27
[PATCH AUTOSEL 4.9 01/41] crypto: ccp - fix error handling 41 (41) 2020/10/18 19:26
[PATCH AUTOSEL 4.14 01/52] crypto: ccp - fix error handling 52 (52) 2020/10/18 19:25
[PATCH AUTOSEL 4.19 01/56] block: ratelimit handle_bad_sector() message 56 (56) 2020/10/18 19:24
[PATCH AUTOSEL 5.4 01/80] md/bitmap: fix memory leak of temporary bitmap 80 (80) 2020/10/18 19:22
[PATCH AUTOSEL 5.8 001/101] md/bitmap: fix memory leak of temporary bitmap 101 (101) 2020/10/18 19:20
[PATCH 0/3] udf: Assorted fixes 4 (4) 2020/09/25 12:57
KMSAN: uninit-value in udf_evict_inode 1 (2) 2020/09/25 10:33
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in udf_evict_inode (2) udf 13 840d 894d 20/26 fixed on 2022/03/08 16:11

Sample crash report:
UDF-fs: warning (device loop0): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2020/09/19 18:44 (1000)
UDF-fs: error (device loop0): udf_read_inode: (ino 1344) failed !bh
=====================================================
BUG: KMSAN: uninit-value in udf_evict_inode+0x380/0x7a0 fs/udf/inode.c:150
CPU: 0 PID: 12200 Comm: syz-executor.0 Not tainted 5.9.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x21c/0x280 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:122
 __msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:201
 udf_evict_inode+0x380/0x7a0 fs/udf/inode.c:150
 evict+0x4ca/0xeb0 fs/inode.c:576
 iput_final fs/inode.c:1652 [inline]
 iput+0xc44/0xf60 fs/inode.c:1678
 iget_failed+0x2c3/0x380 fs/bad_inode.c:242
 __udf_iget+0x15ae/0x4630 fs/udf/inode.c:1914
 udf_iget fs/udf/udfdecl.h:147 [inline]
 udf_fill_super+0x2ed8/0x3280 fs/udf/super.c:2284
 mount_bdev+0x619/0x900 fs/super.c:1417
 udf_mount+0xc9/0xe0 fs/udf/super.c:127
 legacy_get_tree+0x163/0x2e0 fs/fs_context.c:592
 vfs_get_tree+0xd8/0x5d0 fs/super.c:1547
 do_new_mount fs/namespace.c:2875 [inline]
 path_mount+0x3dde/0x5db0 fs/namespace.c:3192
 do_mount+0x1c6/0x220 fs/namespace.c:3205
 __do_compat_sys_mount fs/compat.c:122 [inline]
 __se_compat_sys_mount+0x7bb/0xaa0 fs/compat.c:89
 __ia32_compat_sys_mount+0x62/0x80 fs/compat.c:89
 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline]
 __do_fast_syscall_32+0x129/0x180 arch/x86/entry/common.c:139
 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:162
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:205
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf7fef549
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000f55e8f20 EFLAGS: 00000292 ORIG_RAX: 0000000000000015
RAX: ffffffffffffffda RBX: 00000000f55e8f7c RCX: 0000000020000100
RDX: 0000000020000000 RSI: 0000000000000000 RDI: 00000000f55e8fbc
RBP: 00000000f55e8f7c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:129 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:297
 __msan_chain_origin+0x57/0xa0 mm/kmsan/kmsan_instr.c:151
 udf_alloc_inode+0x252/0x280 fs/udf/super.c:154
 alloc_inode fs/inode.c:232 [inline]
 iget_locked+0x37d/0x13c0 fs/inode.c:1193
 __udf_iget+0x14c/0x4630 fs/udf/inode.c:1902
 udf_iget fs/udf/udfdecl.h:147 [inline]
 udf_fill_super+0x2ed8/0x3280 fs/udf/super.c:2284
 mount_bdev+0x619/0x900 fs/super.c:1417
 udf_mount+0xc9/0xe0 fs/udf/super.c:127
 legacy_get_tree+0x163/0x2e0 fs/fs_context.c:592
 vfs_get_tree+0xd8/0x5d0 fs/super.c:1547
 do_new_mount fs/namespace.c:2875 [inline]
 path_mount+0x3dde/0x5db0 fs/namespace.c:3192
 do_mount+0x1c6/0x220 fs/namespace.c:3205
 __do_compat_sys_mount fs/compat.c:122 [inline]
 __se_compat_sys_mount+0x7bb/0xaa0 fs/compat.c:89
 __ia32_compat_sys_mount+0x62/0x80 fs/compat.c:89
 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline]
 __do_fast_syscall_32+0x129/0x180 arch/x86/entry/common.c:139
 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:162
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:205
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c

Uninit was created at:
 kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:129
 kmsan_alloc_page+0xd3/0x1f0 mm/kmsan/kmsan_shadow.c:278
 __alloc_pages_nodemask+0x84e/0x1040 mm/page_alloc.c:4938
 alloc_pages_current+0x79b/0xb40 mm/mempolicy.c:2275
 alloc_pages include/linux/gfp.h:545 [inline]
 alloc_slab_page mm/slub.c:1630 [inline]
 allocate_slab+0x34b/0x11c0 mm/slub.c:1773
 new_slab mm/slub.c:1834 [inline]
 new_slab_objects mm/slub.c:2591 [inline]
 ___slab_alloc+0xd35/0x1940 mm/slub.c:2752
 __slab_alloc mm/slub.c:2792 [inline]
 slab_alloc_node mm/slub.c:2867 [inline]
 slab_alloc mm/slub.c:2912 [inline]
 kmem_cache_alloc+0x869/0xc70 mm/slub.c:2917
 udf_alloc_inode+0x60/0x280 fs/udf/super.c:144
 alloc_inode fs/inode.c:232 [inline]
 iget_locked+0x37d/0x13c0 fs/inode.c:1193
 __udf_iget+0x14c/0x4630 fs/udf/inode.c:1902
 udf_iget_special fs/udf/udfdecl.h:142 [inline]
 udf_fill_partdesc_info+0xe64/0x1510 fs/udf/super.c:1124
 udf_load_partdesc fs/udf/super.c:1273 [inline]
 udf_process_sequence+0x46b0/0x6df0 fs/udf/super.c:1759
 udf_load_sequence fs/udf/super.c:1795 [inline]
 udf_check_anchor_block+0x50b/0x880 fs/udf/super.c:1835
 udf_scan_anchors+0x27c/0xc60 fs/udf/super.c:1868
 udf_find_anchor fs/udf/super.c:1925 [inline]
 udf_load_vrs+0x33c/0x1560 fs/udf/super.c:1990
 udf_fill_super+0x11f5/0x3280 fs/udf/super.c:2183
 mount_bdev+0x619/0x900 fs/super.c:1417
 udf_mount+0xc9/0xe0 fs/udf/super.c:127
 legacy_get_tree+0x163/0x2e0 fs/fs_context.c:592
 vfs_get_tree+0xd8/0x5d0 fs/super.c:1547
 do_new_mount fs/namespace.c:2875 [inline]
 path_mount+0x3dde/0x5db0 fs/namespace.c:3192
 do_mount+0x1c6/0x220 fs/namespace.c:3205
 __do_compat_sys_mount fs/compat.c:122 [inline]
 __se_compat_sys_mount+0x7bb/0xaa0 fs/compat.c:89
 __ia32_compat_sys_mount+0x62/0x80 fs/compat.c:89
 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline]
 __do_fast_syscall_32+0x129/0x180 arch/x86/entry/common.c:139
 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:162
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:205
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
=====================================================

Crashes (159):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/12 01:01 https://github.com/google/kmsan.git master e16174226146 cca87986 .config console log report info ci-upstream-kmsan-gce-386
2020/11/11 21:17 https://github.com/google/kmsan.git master e16174226146 cca87986 .config console log report info ci-upstream-kmsan-gce-386
2020/11/11 10:55 https://github.com/google/kmsan.git master e16174226146 cca87986 .config console log report info ci-upstream-kmsan-gce-386
2020/11/09 14:57 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/09 06:21 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/08 20:42 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/07 23:22 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/07 19:42 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/07 11:33 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/07 08:03 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/06 15:22 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/06 08:00 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/05 20:59 https://github.com/google/kmsan.git master e16174226146 64069d48 .config console log report info ci-upstream-kmsan-gce-386
2020/11/04 20:29 https://github.com/google/kmsan.git master e16174226146 cba33199 .config console log report info ci-upstream-kmsan-gce-386
2020/11/04 19:56 https://github.com/google/kmsan.git master e16174226146 cba33199 .config console log report info ci-upstream-kmsan-gce-386
2020/11/04 16:23 https://github.com/google/kmsan.git master e16174226146 cba33199 .config console log report info ci-upstream-kmsan-gce-386
2020/11/04 11:28 https://github.com/google/kmsan.git master e16174226146 cba33199 .config console log report info ci-upstream-kmsan-gce-386
2020/11/03 16:21 https://github.com/google/kmsan.git master e16174226146 cba33199 .config console log report info ci-upstream-kmsan-gce-386
2020/11/02 07:43 https://github.com/google/kmsan.git master e16174226146 8bc4594f .config console log report info ci-upstream-kmsan-gce-386
2020/11/01 11:54 https://github.com/google/kmsan.git master e16174226146 8bc4594f .config console log report info ci-upstream-kmsan-gce-386
2020/10/31 01:57 https://github.com/google/kmsan.git master e16174226146 18e33098 .config console log report info ci-upstream-kmsan-gce-386
2020/10/30 22:21 https://github.com/google/kmsan.git master e16174226146 a6e3ac3b .config console log report info ci-upstream-kmsan-gce-386
2020/10/30 20:35 https://github.com/google/kmsan.git master e16174226146 a6e3ac3b .config console log report info ci-upstream-kmsan-gce-386
2020/10/29 23:52 https://github.com/google/kmsan.git master e16174226146 a0c7169a .config console log report info ci-upstream-kmsan-gce-386
2020/10/28 23:45 https://github.com/google/kmsan.git master e16174226146 f24824d3 .config console log report info ci-upstream-kmsan-gce-386
2020/10/26 05:08 https://github.com/google/kmsan.git master e16174226146 a1839e81 .config console log report info ci-upstream-kmsan-gce-386
2020/10/25 22:56 https://github.com/google/kmsan.git master e16174226146 a1839e81 .config console log report info ci-upstream-kmsan-gce-386
2020/10/24 21:47 https://github.com/google/kmsan.git master e16174226146 a1839e81 .config console log report info ci-upstream-kmsan-gce-386
2020/10/22 09:29 https://github.com/google/kmsan.git master e16174226146 be6b1582 .config console log report info ci-upstream-kmsan-gce-386
2020/10/22 04:02 https://github.com/google/kmsan.git master e16174226146 be6b1582 .config console log report info ci-upstream-kmsan-gce-386
2020/10/21 20:17 https://github.com/google/kmsan.git master e16174226146 99c64d5c .config console log report info ci-upstream-kmsan-gce-386
2020/10/20 02:45 https://github.com/google/kmsan.git master e67f4ba870c2 ff4a3345 .config console log report info ci-upstream-kmsan-gce-386
2020/10/19 01:33 https://github.com/google/kmsan.git master e67f4ba870c2 fea47c01 .config console log report info ci-upstream-kmsan-gce-386
2020/10/18 12:16 https://github.com/google/kmsan.git master e67f4ba870c2 fea47c01 .config console log report info ci-upstream-kmsan-gce-386
2020/10/18 03:14 https://github.com/google/kmsan.git master e67f4ba870c2 fea47c01 .config console log report info ci-upstream-kmsan-gce-386
2020/10/18 00:42 https://github.com/google/kmsan.git master e67f4ba870c2 fea47c01 .config console log report info ci-upstream-kmsan-gce-386
2020/10/16 03:31 https://github.com/google/kmsan.git master e67f4ba870c2 6e262c73 .config console log report info ci-upstream-kmsan-gce-386
2020/10/15 10:39 https://github.com/google/kmsan.git master e67f4ba870c2 63869021 .config console log report info ci-upstream-kmsan-gce-386
2020/10/15 01:28 https://github.com/google/kmsan.git master e67f4ba870c2 fc7735a2 .config console log report info ci-upstream-kmsan-gce-386
2020/10/14 16:50 https://github.com/google/kmsan.git master e67f4ba870c2 fc7735a2 .config console log report info ci-upstream-kmsan-gce-386
2020/10/10 17:18 https://github.com/google/kmsan.git master e67f4ba870c2 4a77ae0b .config console log report info ci-upstream-kmsan-gce-386
2020/10/09 10:34 https://github.com/google/kmsan.git master 5edb1df295b9 92390980 .config console log report info ci-upstream-kmsan-gce-386
2020/10/08 22:34 https://github.com/google/kmsan.git master 5edb1df295b9 92390980 .config console log report info ci-upstream-kmsan-gce-386
2020/10/08 19:17 https://github.com/google/kmsan.git master 5edb1df295b9 92390980 .config console log report info ci-upstream-kmsan-gce-386
2020/10/08 00:31 https://github.com/google/kmsan.git master 5edb1df295b9 1880b4a9 .config console log report info ci-upstream-kmsan-gce-386
2020/10/07 10:02 https://github.com/google/kmsan.git master 5edb1df295b9 1880b4a9 .config console log report info ci-upstream-kmsan-gce-386
2020/10/07 06:09 https://github.com/google/kmsan.git master 5edb1df295b9 1880b4a9 .config console log report info ci-upstream-kmsan-gce-386
2020/09/25 03:25 https://github.com/google/kmsan.git master c5a13b33ec11 54289b08 .config console log report info ci-upstream-kmsan-gce-386
2020/09/21 04:25 https://github.com/google/kmsan.git master c5a13b33ec11 9564d2e9 .config console log report info ci-upstream-kmsan-gce-386
2020/09/21 01:30 https://github.com/google/kmsan.git master c5a13b33ec11 9564d2e9 .config console log report info ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.