Re: [syzbot] KMSAN: uninit-value in strstr

2 views
Skip to first unread message

syzbot

unread,
May 4, 2021, 9:47:05 PMMay 4
to gli...@google.com, ph...@philpotter.co.uk, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KMSAN: uninit-value in strstr

=====================================================
BUG: KMSAN: uninit-value in strlen lib/string.c:573 [inline]
BUG: KMSAN: uninit-value in strstr+0xfe/0x2d0 lib/string.c:1011
CPU: 0 PID: 9068 Comm: syz-executor.2 Not tainted 5.12.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x1ff/0x280 lib/dump_stack.c:120
kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
__msan_warning+0x5c/0xa0 mm/kmsan/kmsan_instr.c:197
strlen lib/string.c:573 [inline]
strstr+0xfe/0x2d0 lib/string.c:1011
tipc_nl_node_reset_link_stats+0x434/0xa90 net/tipc/node.c:2576
genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:783 [inline]
genl_rcv_msg+0x1319/0x1420 net/netlink/genetlink.c:800
netlink_rcv_skb+0x464/0x670 net/netlink/af_netlink.c:2502
genl_rcv+0x63/0x80 net/netlink/genetlink.c:811
netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
netlink_unicast+0xf96/0x10f0 net/netlink/af_netlink.c:1338
netlink_sendmsg+0x1246/0x14d0 net/netlink/af_netlink.c:1927
sock_sendmsg_nosec net/socket.c:654 [inline]
sock_sendmsg net/socket.c:674 [inline]
____sys_sendmsg+0x1367/0x1400 net/socket.c:2350
___sys_sendmsg net/socket.c:2404 [inline]
__sys_sendmsg+0x654/0x730 net/socket.c:2433
__do_sys_sendmsg net/socket.c:2442 [inline]
__se_sys_sendmsg+0x97/0xb0 net/socket.c:2440
__x64_sys_sendmsg+0x4a/0x70 net/socket.c:2440
do_syscall_64+0xa2/0x120 arch/x86/entry/common.c:48
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x463ca9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb5f8ec7188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000000000055bf00 RCX: 0000000000463ca9
RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003
RBP: 00000000004ae538 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bf00
R13: 00007fff3a414a8f R14: 00007fb5f8ec7300 R15: 0000000000022000

Uninit was created at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline]
kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104
kmsan_slab_alloc+0x8e/0xe0 mm/kmsan/kmsan_hooks.c:76
slab_alloc_node mm/slub.c:2922 [inline]
__kmalloc_node_track_caller+0xb5b/0x1540 mm/slub.c:4609
kmalloc_reserve net/core/skbuff.c:353 [inline]
__alloc_skb+0x438/0xd80 net/core/skbuff.c:424
alloc_skb include/linux/skbuff.h:1103 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1184 [inline]
netlink_sendmsg+0x7d3/0x14d0 net/netlink/af_netlink.c:1902
sock_sendmsg_nosec net/socket.c:654 [inline]
sock_sendmsg net/socket.c:674 [inline]
____sys_sendmsg+0x1367/0x1400 net/socket.c:2350
___sys_sendmsg net/socket.c:2404 [inline]
__sys_sendmsg+0x654/0x730 net/socket.c:2433
__do_sys_sendmsg net/socket.c:2442 [inline]
__se_sys_sendmsg+0x97/0xb0 net/socket.c:2440
__x64_sys_sendmsg+0x4a/0x70 net/socket.c:2440
do_syscall_64+0xa2/0x120 arch/x86/entry/common.c:48
entry_SYSCALL_64_after_hwframe+0x44/0xae
=====================================================


Tested on:

commit: 4ebaab5f kmsan: drop unneeded references to kmsan_context_..
git tree: https://github.com/google/kmsan.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=135b38c3d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2a343120ab924873
dashboard link: https://syzkaller.appspot.com/bug?extid=a73d24a22eeeebe5f244
compiler: Debian clang version 11.0.1-2

syzbot

unread,
May 8, 2021, 8:47:06 PMMay 8
to gli...@google.com, ph...@philpotter.co.uk, syzkall...@googlegroups.com
Hello,

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

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

Tested on:

commit: 4ebaab5f kmsan: drop unneeded references to kmsan_context_..
git tree: https://github.com/google/kmsan.git master
patch: https://syzkaller.appspot.com/x/patch.diff?x=127c9709d00000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages