syzbot


KMSAN: uninit-value in rb_erase (2)

Status: auto-closed as invalid on 2019/07/22 18:27
Subsystems: media
[Documentation on labels]
First crash: 1920d, last: 1920d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in rb_erase block 2 2157d 2158d 0/26 closed as invalid on 2018/06/28 12:38

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in ____rb_erase_color lib/rbtree.c:258 [inline]
BUG: KMSAN: uninit-value in rb_erase+0x116e/0x2890 lib/rbtree.c:462
CPU: 1 PID: 13329 Comm: syz-executor4 Not tainted 5.0.0-rc1+ #7
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+0x173/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:600
 __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313
 ____rb_erase_color lib/rbtree.c:258 [inline]
 rb_erase+0x116e/0x2890 lib/rbtree.c:462
 __free_vmap_area+0x293/0x620 mm/vmalloc.c:573
 __purge_vmap_area_lazy+0x2d1/0x3d0 mm/vmalloc.c:683
 try_purge_vmap_area_lazy mm/vmalloc.c:698 [inline]
 free_vmap_area_noflush mm/vmalloc.c:730 [inline]
 free_unmap_vmap_area+0x255/0x290 mm/vmalloc.c:743
 remove_vm_area mm/vmalloc.c:1491 [inline]
 __vunmap+0x6cc/0x910 mm/vmalloc.c:1520
 vfree+0x8b/0x180 mm/vmalloc.c:1599
 vb2_vmalloc_put+0x7d/0xc0 drivers/media/common/videobuf2/videobuf2-vmalloc.c:69
 __vb2_buf_mem_free drivers/media/common/videobuf2/videobuf2-core.c:242 [inline]
 __vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:413 [inline]
 __vb2_queue_free+0x7d9/0x1410 drivers/media/common/videobuf2/videobuf2-core.c:458
 vb2_core_reqbufs+0x91b/0x1540 drivers/media/common/videobuf2/videobuf2-core.c:692
 __vb2_cleanup_fileio drivers/media/common/videobuf2/videobuf2-core.c:2537 [inline]
 vb2_core_queue_release+0x1d8/0x430 drivers/media/common/videobuf2/videobuf2-core.c:2261
 vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:842 [inline]
 _vb2_fop_release drivers/media/common/videobuf2/videobuf2-v4l2.c:1015 [inline]
 vb2_fop_release+0x2c6/0x3d0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1029
 vivid_fop_release+0xe8a/0x10c0 drivers/media/platform/vivid/vivid-core.c:475
 v4l2_release+0x248/0x5e0 drivers/media/v4l2-core/v4l2-dev.c:456
 __fput+0x4d1/0xbb0 fs/file_table.c:278
 ____fput+0x37/0x40 fs/file_table.c:309
 task_work_run+0x22e/0x2a0 kernel/task_work.c:113
 get_signal+0x1f9d/0x2050 kernel/signal.c:2347
 do_signal+0x1d5/0x2cc0 arch/x86/kernel/signal.c:816
 exit_to_usermode_loop arch/x86/entry/common.c:162 [inline]
 prepare_exit_to_usermode+0x245/0x420 arch/x86/entry/common.c:197
 syscall_return_slowpath+0xb2/0x650 arch/x86/entry/common.c:268
 do_syscall_64+0xe2/0xf0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x458099
Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fcb42c77c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: fffffffffffffe00 RBX: 0000000000000003 RCX: 0000000000458099
RDX: 0000000000000052 RSI: 0000000020000540 RDI: 0000000000000004
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fcb42c786d4
R13: 00000000004c3b5d R14: 00000000004d83b0 R15: 00000000ffffffff

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:159
 kmsan_kmalloc+0xa6/0x130 mm/kmsan/kmsan_hooks.c:176
 kmem_cache_alloc_node_trace+0xb59/0xc70 mm/slub.c:2814
 kmalloc_node include/linux/slab.h:583 [inline]
 alloc_vmap_area+0x210/0x15f0 mm/vmalloc.c:420
 __get_vm_area_node+0x3e6/0x7f0 mm/vmalloc.c:1397
 get_vm_area+0xbf/0xd0 mm/vmalloc.c:1435
 kmsan_vmalloc_area_node+0x6d/0x1b0 mm/kmsan/kmsan_hooks.c:250
 __vmalloc_area_node mm/vmalloc.c:1709 [inline]
 __vmalloc_node_range+0xc14/0x13a0 mm/vmalloc.c:1756
 __vmalloc_node mm/vmalloc.c:1801 [inline]
 __vmalloc_node_flags mm/vmalloc.c:1815 [inline]
 vzalloc+0xd8/0xf0 mm/vmalloc.c:1854
 alloc_counters+0x99/0x8d0 net/ipv6/netfilter/ip6_tables.c:819
 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:841 [inline]
 get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline]
 do_ip6t_get_ctl+0x7da/0x1030 net/ipv6/netfilter/ip6_tables.c:1712
 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline]
 nf_getsockopt+0x481/0x4e0 net/netfilter/nf_sockopt.c:122
 ipv6_getsockopt+0x279/0x510 net/ipv6/ipv6_sockglue.c:1392
 tcp_getsockopt+0x1c6/0x1f0 net/ipv4/tcp.c:3591
 sock_common_getsockopt+0x13f/0x180 net/core/sock.c:2950
 __sys_getsockopt+0x489/0x550 net/socket.c:1939
 __do_sys_getsockopt net/socket.c:1950 [inline]
 __se_sys_getsockopt+0xe1/0x100 net/socket.c:1947
 __x64_sys_getsockopt+0x62/0x80 net/socket.c:1947
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/01/23 18:07 https://github.com/google/kmsan.git master 02f2d5aea531 7cf3249c .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.