KMSAN: uninit-value in rds_bind

17 views
Skip to first unread message

syzbot

unread,
Aug 30, 2018, 2:31:03 PM8/30/18
to da...@davemloft.net, linux-...@vger.kernel.org, linux...@vger.kernel.org, net...@vger.kernel.org, rds-...@oss.oracle.com, santosh....@oracle.com, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 2dca2cbde67a kmsan: fix build warnings with CONFIG_KMSAN=n
git tree: https://github.com/google/kmsan.git/master
console output: https://syzkaller.appspot.com/x/log.txt?x=16db895a400000
kernel config: https://syzkaller.appspot.com/x/.config?x=820d6393634b55e3
dashboard link: https://syzkaller.appspot.com/bug?extid=915c9f99f3dbc4bd6cd1
compiler: clang version 8.0.0 (trunk 339414)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1137bffe400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1521a7fe400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+915c9f...@syzkaller.appspotmail.com

random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
==================================================================
BUG: KMSAN: uninit-value in rds_bind+0x1f1/0x2360 net/rds/bind.c:174
CPU: 1 PID: 4497 Comm: syz-executor098 Not tainted 4.19.0-rc1+ #36
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+0x14b/0x190 lib/dump_stack.c:113
kmsan_report+0x183/0x2b0 mm/kmsan/kmsan.c:956
__msan_warning+0x70/0xc0 mm/kmsan/kmsan_instr.c:645
rds_bind+0x1f1/0x2360 net/rds/bind.c:174
__sys_bind+0x594/0x6f0 net/socket.c:1481
__do_sys_bind net/socket.c:1492 [inline]
__se_sys_bind net/socket.c:1490 [inline]
__x64_sys_bind+0xd8/0x120 net/socket.c:1490
do_syscall_64+0x15b/0x220 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x440099
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffb43cf578 EFLAGS: 00000213 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440099
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000401920
R13: 00000000004019b0 R14: 0000000000000000 R15: 0000000000000000

Local variable description: ----address@__sys_bind
Variable was created at:
__sys_bind+0x6a/0x6f0 net/socket.c:1468
__do_sys_bind net/socket.c:1492 [inline]
__se_sys_bind net/socket.c:1490 [inline]
__x64_sys_bind+0xd8/0x120 net/socket.c:1490
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

Santosh Shilimkar

unread,
Aug 30, 2018, 3:30:51 PM8/30/18
to syzbot, da...@davemloft.net, linux-...@vger.kernel.org, linux...@vger.kernel.org, net...@vger.kernel.org, rds-...@oss.oracle.com, syzkall...@googlegroups.com
On 8/30/2018 11:31 AM, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    2dca2cbde67a kmsan: fix build warnings with CONFIG_KMSAN=n
> git tree:       https://github.com/google/kmsan.git/master
> console output: https://syzkaller.appspot.com/x/log.txt?x=16db895a400000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=820d6393634b55e3
> dashboard link:
> https://syzkaller.appspot.com/bug?extid=915c9f99f3dbc4bd6cd1
> compiler:       clang version 8.0.0 (trunk 339414)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1137bffe400000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1521a7fe400000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+915c9f...@syzkaller.appspotmail.com
>
OK. Will send the fix to address this.

Regards,
Santosh

Santosh Shilimkar

unread,
Aug 30, 2018, 4:56:48 PM8/30/18
to syzbot, linux...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, da...@davemloft.net, linux-...@vger.kernel.org
On 8/30/2018 11:31 AM, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    2dca2cbde67a kmsan: fix build warnings with CONFIG_KMSAN=n
> git tree:       https://github.com/google/kmsan.git/master

BTW, can you please fix your git url since this one doesn't work.
This tree is not vanila kernel.org tree(4.19.0-rc1+ #36), so would be
good to get the line numbers correct for sources.

Regards,
Snatosh

Dmitry Vyukov

unread,
Aug 30, 2018, 5:05:55 PM8/30/18
to Santosh Shilimkar, syzbot, linux...@vger.kernel.org, netdev, syzkaller-bugs, David Miller, LKML
On Thu, Aug 30, 2018 at 1:56 PM, Santosh Shilimkar
<santosh....@oracle.com> wrote:
> On 8/30/2018 11:31 AM, syzbot wrote:
>>
>> Hello,
>>
>> syzbot found the following crash on:
>>
>> HEAD commit: 2dca2cbde67a kmsan: fix build warnings with CONFIG_KMSAN=n
>> git tree: https://github.com/google/kmsan.git/master
>
>
> BTW, can you please fix your git url since this one doesn't work.

I will fix this. Thanks.

But just to unblock you, it's git repo/branch, i.e.
https://github.com/google/kmsan.git is repo, and branch is master.


> This tree is not vanila kernel.org tree(4.19.0-rc1+ #36), so would be
> good to get the line numbers correct for sources.
>
> Regards,
> Snatosh
>
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-bugs/355351e8-71fa-6db9-ad2a-43115cc2e80e%40oracle.com.
>
> For more options, visit https://groups.google.com/d/optout.

syzbot

unread,
Sep 8, 2018, 7:03:04 AM9/8/18
to sowmini....@oracle.com, syzkall...@googlegroups.com
Hello,

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

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

Tested on:

commit: 42a037ca8d9d kmsan: update README.md to reference LLVM r34..
git tree: https://github.com/google/kmsan.git/master
kernel config: https://syzkaller.appspot.com/x/.config?x=820d6393634b55e3
compiler: clang version 8.0.0 (trunk 339414)
patch: https://syzkaller.appspot.com/x/patch.diff?x=121325b6400000

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