syzbot


KMSAN: uninit-value in translate_table

Status: auto-closed as invalid on 2020/12/24 01:52
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+1b3443758a99dc0f4ac6@syzkaller.appspotmail.com
First crash: 1327d, last: 1327d
Discussions (1)
Title Replies (including bot) Last reply
KMSAN: uninit-value in translate_table 0 (1) 2020/08/30 06:08
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in translate_table (2) netfilter 4 1003d 1045d 0/26 auto-closed as invalid on 2021/11/13 14:40

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in check_entry_size_and_hooks net/ipv4/netfilter/ip_tables.c:599 [inline]
BUG: KMSAN: uninit-value in translate_table+0xde9/0x3c90 net/ipv4/netfilter/ip_tables.c:685
CPU: 1 PID: 16172 Comm: syz-executor.2 Not tainted 5.8.0-rc5-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:121
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 check_entry_size_and_hooks net/ipv4/netfilter/ip_tables.c:599 [inline]
 translate_table+0xde9/0x3c90 net/ipv4/netfilter/ip_tables.c:685
 translate_compat_table net/ipv4/netfilter/ip_tables.c:1465 [inline]
 compat_do_replace net/ipv4/netfilter/ip_tables.c:1519 [inline]
 compat_do_ipt_set_ctl+0x34fc/0x4310 net/ipv4/netfilter/ip_tables.c:1548
 compat_nf_sockopt+0x904/0x980 net/netfilter/nf_sockopt.c:146
 compat_nf_setsockopt+0x122/0x160 net/netfilter/nf_sockopt.c:156
 compat_ip_setsockopt+0x46f/0x1940 net/ipv4/ip_sockglue.c:1449
 inet_csk_compat_setsockopt+0x161/0x240 net/ipv4/inet_connection_sock.c:1087
 compat_tcp_setsockopt+0x187/0x1a0 net/ipv4/tcp.c:3345
 compat_sock_common_setsockopt+0x1a3/0x1c0 net/core/sock.c:3275
 __compat_sys_setsockopt+0x4be/0x9c0 net/compat.c:402
 __do_compat_sys_setsockopt net/compat.c:415 [inline]
 __se_compat_sys_setsockopt+0xdd/0x100 net/compat.c:412
 __ia32_compat_sys_setsockopt+0x62/0x80 net/compat.c:412
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2af/0x480 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf7f23549
Code: Bad RIP value.
RSP: 002b:00000000f551d0cc EFLAGS: 00000296 ORIG_RAX: 000000000000016e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000000
RDX: 0000000000000040 RSI: 0000000020000000 RDI: 00000000000002a4
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127
 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:80
 slab_alloc_node mm/slub.c:2839 [inline]
 __kmalloc_node+0xe70/0x1280 mm/slub.c:3959
 kmalloc_node include/linux/slab.h:578 [inline]
 kvmalloc_node+0x205/0x490 mm/util.c:574
 kvmalloc include/linux/mm.h:753 [inline]
 xt_alloc_table_info+0xda/0x1b0 net/netfilter/x_tables.c:1176
 translate_compat_table net/ipv4/netfilter/ip_tables.c:1429 [inline]
 compat_do_replace net/ipv4/netfilter/ip_tables.c:1519 [inline]
 compat_do_ipt_set_ctl+0x1a64/0x4310 net/ipv4/netfilter/ip_tables.c:1548
 compat_nf_sockopt+0x904/0x980 net/netfilter/nf_sockopt.c:146
 compat_nf_setsockopt+0x122/0x160 net/netfilter/nf_sockopt.c:156
 compat_ip_setsockopt+0x46f/0x1940 net/ipv4/ip_sockglue.c:1449
 inet_csk_compat_setsockopt+0x161/0x240 net/ipv4/inet_connection_sock.c:1087
 compat_tcp_setsockopt+0x187/0x1a0 net/ipv4/tcp.c:3345
 compat_sock_common_setsockopt+0x1a3/0x1c0 net/core/sock.c:3275
 __compat_sys_setsockopt+0x4be/0x9c0 net/compat.c:402
 __do_compat_sys_setsockopt net/compat.c:415 [inline]
 __se_compat_sys_setsockopt+0xdd/0x100 net/compat.c:412
 __ia32_compat_sys_setsockopt+0x62/0x80 net/compat.c:412
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2af/0x480 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/26 01:51 https://github.com/google/kmsan.git master ce8056d1f79e 344da168 .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.