syzbot


BUG: unable to handle kernel NULL pointer dereference in htb_select_queue

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+b53a709f04722ca12a3c@syzkaller.appspotmail.com
Fix commit: fb3a3e37de33 sch_htb: Fix offload cleanup in htb_destroy on htb_init failure 93bde210c434 sch_htb: Fix select_queue for non-offload mode
First crash: 601d, last: 552d

Cause bisection: introduced by (bisect log) :
commit d03b195b5aa015f6c11988b86a3625f8d5dbac52
Author: Maxim Mikityanskiy <maximmi@mellanox.com>
Date: Tue Jan 19 12:08:13 2021 +0000

  sch_htb: Hierarchical QoS hardware offload

Crash: BUG: unable to handle kernel NULL pointer dereference in htb_select_queue (log)
Repro: syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2021/03/11 10:55 11m yildirim.fatih@gmail.com upstream report log

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 183fe067 P4D 183fe067 PUD 21aef067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 10125 Comm: syz-executor.0 Not tainted 5.11.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000a9c74e8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff92001538e9e RCX: 0000000000000000
RDX: ffffc9000a9c7520 RSI: 0000000000000012 RDI: ffff88802d158000
RBP: ffff88802d158000 R08: 00000000fffffff1 R09: 0000000000000400
R10: ffffffff871631c4 R11: 0000000000000000 R12: ffffffff89ea6b40
R13: dffffc0000000000 R14: ffff888012b79c00 R15: 00000000ffff0000
FS:  00007f73f9698700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000173b5000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 htb_offload net/sched/sch_htb.c:1011 [inline]
 htb_select_queue+0x17f/0x2c0 net/sched/sch_htb.c:1349
 tc_modify_qdisc+0x44a/0x1a50 net/sched/sch_api.c:1657
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2348
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2402
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2435
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x466019
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:00007f73f9698188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466019
RDX: 0000000000000000 RSI: 00000000200007c0 RDI: 0000000000000004
RBP: 00000000004bd067 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007fffefccc11f R14: 00007f73f9698300 R15: 0000000000022000
Modules linked in:
CR2: 0000000000000000
---[ end trace e1544e8206616773 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000a9c74e8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff92001538e9e RCX: 0000000000000000
RDX: ffffc9000a9c7520 RSI: 0000000000000012 RDI: ffff88802d158000
RBP: ffff88802d158000 R08: 00000000fffffff1 R09: 0000000000000400
R10: ffffffff871631c4 R11: 0000000000000000 R12: ffffffff89ea6b40
R13: dffffc0000000000 R14: ffff888012b79c00 R15: 00000000ffff0000
FS:  00007f73f9698700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000173b5000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2021/02/20 00:50 net-next 38b5133ad607 f689d40a .config log report syz BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-kasan-gce 2021/03/24 11:08 upstream 7acac4b3196c e613994b .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-kasan-gce 2021/02/27 15:12 upstream 3fb6d0e00efc 4c37c133 .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-net-kasan-gce 2021/03/03 06:08 net-next d310ec03a34e e5b64d68 .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-net-kasan-gce 2021/02/19 21:39 net-next 38b5133ad607 f689d40a .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-net-kasan-gce 2021/02/11 15:18 net-next e4b62cf7559f a52ee10a .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-net-kasan-gce 2021/02/08 19:37 net-next badc6ac32122 2ce644fc .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
ci-upstream-net-kasan-gce 2021/02/03 04:11 net-next 9ae4bdc6e4c1 624dad51 .config log report info BUG: unable to handle kernel NULL pointer dereference in htb_select_queue
* Struck through repros no longer work on HEAD.