syzbot


general protection fault in qdisc_hash_add

Status: fixed on 2020/05/10 10:41
Subsystems: net
[Documentation on labels]
Fix commit: 7c4046b1c53b Revert "net: sched: make newly activated qdiscs visible"
First crash: 1673d, last: 1672d
Cause bisection: introduced by (bisect log) :
commit 4cda75275f9f89f9485b0ca4d6950c95258a9bce
Author: Julian Wiedmann <jwi@linux.ibm.com>
Date: Tue Mar 10 16:53:35 2020 +0000

  net: sched: make newly activated qdiscs visible

Crash: general protection fault in qdisc_hash_add (log)
Repro: C syz .config
  

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000008f: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000478-0x000000000000047f]
CPU: 0 PID: 9510 Comm: syz-executor525 Not tainted 5.6.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:hlist_add_head_rcu include/linux/rculist.h:538 [inline]
RIP: 0010:qdisc_hash_add.part.0+0xc3/0x260 net/sched/sch_api.c:279
Code: 69 6b 38 47 86 c8 61 4c 8d 7b 28 48 b8 00 00 00 00 00 fc ff df c1 ed 1c 4d 8d ac ee 78 04 00 00 4c 89 ea 4c 89 ef 48 c1 ea 03 <80> 3c 02 00 0f 85 7b 01 00 00 4c 89 fa 49 8b ac ee 78 04 00 00 48
RSP: 0018:ffffc90001fb7b48 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffffff8a387fc0 RCX: ffffffff86278e85
RDX: 000000000000008f RSI: ffffffff86278e92 RDI: 0000000000000478
RBP: 0000000000000000 R08: ffff8880a761c200 R09: fffffbfff1469d6d
R10: fffffbfff1469d6c R11: ffffffff8a34eb67 R12: 0000000000000000
R13: 0000000000000478 R14: 0000000000000000 R15: ffffffff8a387fe8
FS:  00000000013b9880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 00000000a8f58000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 qdisc_hash_add+0xa5/0xc0 net/sched/sch_api.c:283
 dev_qdisc_set_real_num_tx_queues+0x19b/0x250 net/sched/sch_generic.c:1287
 netif_set_real_num_tx_queues+0x25b/0x700 net/core/dev.c:2878
 tun_set_real_num_queues drivers/net/tun.c:598 [inline]
 tun_attach+0x549/0x1550 drivers/net/tun.c:845
 tun_set_iff drivers/net/tun.c:2704 [inline]
 __tun_chr_ioctl+0x1ff7/0x4120 drivers/net/tun.c:3043
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl+0x11a/0x180 fs/ioctl.c:763
 __do_sys_ioctl fs/ioctl.c:772 [inline]
 __se_sys_ioctl fs/ioctl.c:770 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:770
 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440209
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:00007ffda46def28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000003172 RCX: 0000000000440209
RDX: 00000000200000c0 RSI: 00000000400454ca RDI: 0000000000000004
RBP: 656c6c616b7a7973 R08: 0000000000401a90 R09: 0000000000401a90
R10: 0000000000401a90 R11: 0000000000000246 R12: 0000000000401a90
R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace e1e02f1f7ff79e04 ]---
RIP: 0010:hlist_add_head_rcu include/linux/rculist.h:538 [inline]
RIP: 0010:qdisc_hash_add.part.0+0xc3/0x260 net/sched/sch_api.c:279
Code: 69 6b 38 47 86 c8 61 4c 8d 7b 28 48 b8 00 00 00 00 00 fc ff df c1 ed 1c 4d 8d ac ee 78 04 00 00 4c 89 ea 4c 89 ef 48 c1 ea 03 <80> 3c 02 00 0f 85 7b 01 00 00 4c 89 fa 49 8b ac ee 78 04 00 00 48
RSP: 0018:ffffc90001fb7b48 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffffff8a387fc0 RCX: ffffffff86278e85
RDX: 000000000000008f RSI: ffffffff86278e92 RDI: 0000000000000478
RBP: 0000000000000000 R08: ffff8880a761c200 R09: fffffbfff1469d6d
R10: fffffbfff1469d6c R11: ffffffff8a34eb67 R12: 0000000000000000
R13: 0000000000000478 R14: 0000000000000000 R15: ffffffff8a387fe8
FS:  00000000013b9880(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 00000000a8f58000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (47):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/12 09:47 net-next-old e6e0f093d978 d850e9d0 .config console log report syz C ci-upstream-net-kasan-gce
2020/03/12 22:42 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 21:15 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 20:30 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 20:10 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 19:29 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 18:42 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 14:37 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 13:17 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 12:24 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 10:39 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:37 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:25 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:23 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:20 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:19 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:19 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:16 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:13 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:12 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:12 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:08 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:07 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:03 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:02 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 09:01 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:58 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:56 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:50 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:49 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:47 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:46 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:29 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:27 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:25 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:23 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:22 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:21 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:20 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:20 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:13 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
2020/03/12 08:10 net-next-old e6e0f093d978 d850e9d0 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.