syzbot


BUG: corrupted list in taprio_destroy

Status: fixed on 2023/06/08 14:41
Subsystems: net
[Documentation on labels]
Fix commit: 4fab64126891 net/sched: fix error recovery in qdisc_create()
First crash: 441d, last: 441d
Cause bisection: introduced by (bisect log) :
commit 565b4824c39fa335cba2028a09d7beb7112f3c9a
Author: Jiri Pirko <jiri@nvidia.com>
Date: Mon Feb 6 09:41:51 2023 +0000

  devlink: change port event netdev notifier from per-net to global

Crash: unregister_netdevice: waiting for DEV to become free (log)
Repro: C syz .config
  

Sample crash report:
list_del corruption, ffff8880798f2380->next is NULL
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:49!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5076 Comm: syz-executor808 Not tainted 6.2.0-rc7-syzkaller-01554-gde4287336794 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:__list_del_entry_valid.cold+0x48/0x72 lib/list_debug.c:49
Code: e8 26 2a f0 ff 0f 0b 4c 89 e2 48 89 ee 48 c7 c7 00 c4 a6 8a e8 12 2a f0 ff 0f 0b 48 89 ee 48 c7 c7 e0 c2 a6 8a e8 01 2a f0 ff <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 a0 c3 a6 8a e8 ed 29 f0 ff 0f 0b
RSP: 0018:ffffc90003c7f3b8 EFLAGS: 00010282
RAX: 0000000000000033 RBX: ffff8880798f2000 RCX: 0000000000000000
RDX: ffff888026991d40 RSI: ffffffff8166195c RDI: fffff5200078fe69
RBP: ffff8880798f2380 R08: 0000000000000033 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880798f2388 R15: 0000000080010000
FS:  00005555558ce300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000668cf0 CR3: 000000001e4fe000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry include/linux/list.h:134 [inline]
 list_del include/linux/list.h:148 [inline]
 taprio_destroy+0x7e/0x6e0 net/sched/sch_taprio.c:1973
 qdisc_create+0xaca/0x1150 net/sched/sch_api.c:1329
 tc_modify_qdisc+0x488/0x19c0 net/sched/sch_api.c:1679
 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6174
 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:722 [inline]
 sock_sendmsg+0xde/0x190 net/socket.c:745
 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501
 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555
 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fbcb6e7d839
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeb271eee8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ffeb271eef8 RCX: 00007fbcb6e7d839
RDX: 0000000000000000 RSI: 00000000200007c0 RDI: 0000000000000004
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffeb271ef00
R13: 00007ffeb271ef20 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid.cold+0x48/0x72 lib/list_debug.c:49
Code: e8 26 2a f0 ff 0f 0b 4c 89 e2 48 89 ee 48 c7 c7 00 c4 a6 8a e8 12 2a f0 ff 0f 0b 48 89 ee 48 c7 c7 e0 c2 a6 8a e8 01 2a f0 ff <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 a0 c3 a6 8a e8 ed 29 f0 ff 0f 0b
RSP: 0018:ffffc90003c7f3b8 EFLAGS: 00010282
RAX: 0000000000000033 RBX: ffff8880798f2000 RCX: 0000000000000000
RDX: ffff888026991d40 RSI: ffffffff8166195c RDI: fffff5200078fe69
RBP: ffff8880798f2380 R08: 0000000000000033 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880798f2388 R15: 0000000080010000
FS:  00005555558ce300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000600 CR3: 000000001e4fe000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/11 10:06 net-next-old de4287336794 93e26d60 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in taprio_destroy
2023/02/11 09:47 net-next-old de4287336794 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in taprio_destroy
* Struck through repros no longer work on HEAD.