BUG: unable to handle kernel NULL pointer dereference in inet_autobind

24 views
Skip to first unread message

syzbot

unread,
Oct 29, 2019, 5:49:07 AM10/29/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: ddef1e8e Linux 4.14.151
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1533bde4e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a2b317f0c5f02ed3
dashboard link: https://syzkaller.appspot.com/bug?extid=5b78051b180613f94dff
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: (null)
PGD 63f89067 P4D 63f89067 PUD 96213067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 29039 Comm: syz-executor.1 Not tainted 4.14.151 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff8880625b2680 task.stack: ffff88803c2e8000
RIP: 0010: (null)
RSP: 0018:ffff88803c2efd48 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffffff88151060 RCX: ffffc90008c44000
RDX: 1ffffffff102a223 RSI: 0000000000000000 RDI: ffff88809dfbc000
RBP: ffff88803c2efd68 R08: 0000000000000001 R09: ffff8880625b2f20
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809dfbc000
R13: ffff88809dfbc00e R14: 000000000000001c R15: 0000000000000802
FS: 00007fb539870700(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000954b8000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
inet_autobind+0xae/0x180 net/ipv4/af_inet.c:181
inet_dgram_connect+0x136/0x1e0 net/ipv4/af_inet.c:538
SYSC_connect+0x1f6/0x2d0 net/socket.c:1655
SyS_connect+0x24/0x30 net/socket.c:1636
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x459f49
RSP: 002b:00007fb53986fc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459f49
RDX: 000000000000001c RSI: 0000000020000080 RDI: 0000000000000004
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb5398706d4
R13: 00000000004c0671 R14: 00000000004d2d28 R15: 00000000ffffffff
Code: Bad RIP value.
RIP: (null) RSP: ffff88803c2efd48
CR2: 0000000000000000
kobject: 'loop5' (ffff8880a4aeaa20): kobject_uevent_env
kobject: 'loop5' (ffff8880a4aeaa20): fill_kobj_path: path
= '/devices/virtual/block/loop5'
devpts: called with bogus options
kobject: 'loop2' (ffff8880a4a2b7e0): kobject_uevent_env
kobject: 'loop2' (ffff8880a4a2b7e0): fill_kobj_path: path
= '/devices/virtual/block/loop2'
devpts: called with bogus options
kobject: 'loop0' (ffff8880a495d6e0): kobject_uevent_env
---[ end trace 9bda6e80788d1b41 ]---


---
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#status for how to communicate with syzbot.

syzbot

unread,
Oct 29, 2019, 5:56:06 AM10/29/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: ddef1e8e Linux 4.14.151
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1126ff18e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a2b317f0c5f02ed3
dashboard link: https://syzkaller.appspot.com/bug?extid=5b78051b180613f94dff
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15ac6b74e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14164a48e00000

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

random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1572342749.159:36): avc: denied { map } for
pid=6818 comm="syz-executor705" path="/root/syz-executor705276554"
dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: (null)
PGD 91392067 P4D 91392067 PUD 9b9d6067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 6818 Comm: syz-executor705 Not tainted 4.14.151 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff8880a5ad6280 task.stack: ffff8880a60c0000
RIP: 0010: (null)
RSP: 0018:ffff8880a60c7d48 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffffffff88151060 RCX: 1ffff11014b5ad64
RDX: 1ffffffff102a223 RSI: 0000000000000000 RDI: ffff88809b53a000
RBP: ffff8880a60c7d68 R08: 0000000000000001 R09: ffff8880a5ad6b20
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809b53a000
R13: ffff88809b53a00e R14: 000000000000001c R15: 0000000000000002
FS: 0000000002376880(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009430e000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
inet_autobind+0xae/0x180 net/ipv4/af_inet.c:181
inet_dgram_connect+0x136/0x1e0 net/ipv4/af_inet.c:538
SYSC_connect+0x1f6/0x2d0 net/socket.c:1655
SyS_connect+0x24/0x30 net/socket.c:1636
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440179
RSP: 002b:00007ffdc3563d68 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440179
RDX: 000000000000001c RSI: 0000000020d83fe4 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a00
R13: 0000000000401a90 R14: 0000000000000000 R15: 0000000000000000
Code: Bad RIP value.
RIP: (null) RSP: ffff8880a60c7d48
CR2: 0000000000000000
---[ end trace 805502f50c3d4606 ]---

syzbot

unread,
Dec 14, 2019, 8:44:01 AM12/14/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 7c3c0d51129a1914e36f1942b1c226e894859f08
Author: Xin Long <lucie...@gmail.com>
Date: Wed Jun 26 08:31:39 2019 +0000

sctp: not bind the socket in sctp_connect

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1225a03ae00000
start commit: ddef1e8e Linux 4.14.151
git tree: linux-4.14.y
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1557b75ce00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=176bc6c8e00000

If the result looks correct, please mark the bug fixed by replying with:

#syz fix: sctp: not bind the socket in sctp_connect

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages