syzbot


general protection fault in coalesce_fill_reply

Status: fixed on 2024/08/14 03:44
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+e77327e34cdc8c36b7d3@syzkaller.appspotmail.com
Fix commit: 74d6529b78f7 net: ethtool: Fix the panic caused by dev being null when dumping coalesce
First crash: 126d, last: 121d
Cause bisection: introduced by (bisect log) :
commit 55a3982ec721dabd5a4c2f16bfb03deb032e45c2
Author: Shannon Nelson <shannon.nelson@amd.com>
Date: Wed Jun 19 00:32:55 2024 +0000

  ionic: check for queue deadline in doorbell_napi_work

Crash: lost connection to test machine (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH RESEND net-next] net: ethtool: Fix the panic caused by dev being null when dumping coalesce 3 (3) 2024/07/01 12:50
[PATCH net] net: ethtool: Fix the panic caused by dev being null when dumping coalesce 3 (3) 2024/06/28 04:41
[syzbot] [net?] general protection fault in coalesce_fill_reply 2 (4) 2024/06/27 04:59

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000193: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000c98-0x0000000000000c9f]
CPU: 1 PID: 5093 Comm: syz-executor403 Not tainted 6.10.0-rc4-syzkaller-00936-g50b70845fc5c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:coalesce_fill_reply+0xcc/0x1b70 net/ethtool/coalesce.c:214
Code: e8 19 2c f9 f7 4c 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 e3 f1 5e f8 bb 98 0c 00 00 49 03 1e 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 c5 f1 5e f8 48 8b 03 48 89 44 24
RSP: 0018:ffffc90003526ee0 EFLAGS: 00010206
RAX: 0000000000000193 RBX: 0000000000000c98 RCX: ffff88802661da00
RDX: 0000000000000000 RSI: ffff88801b72e740 RDI: ffff88802dac6780
RBP: ffffc90003527118 R08: ffffffff899bb137 R09: 1ffff11003e8b805
R10: dffffc0000000000 R11: ffffffff899cf860 R12: ffffffff899cf860
R13: dffffc0000000000 R14: ffff88801b72e740 R15: ffff88802dac6780
FS:  000055557bf45380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200f9018 CR3: 0000000066db0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ethnl_default_dump_one net/ethtool/netlink.c:467 [inline]
 ethnl_default_dumpit+0x5ac/0xb30 net/ethtool/netlink.c:494
 genl_dumpit+0x107/0x1a0 net/netlink/genetlink.c:1027
 netlink_dump+0x647/0xd80 net/netlink/af_netlink.c:2325
 __netlink_dump_start+0x59f/0x780 net/netlink/af_netlink.c:2440
 genl_family_rcv_msg_dumpit net/netlink/genetlink.c:1076 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:1192 [inline]
 genl_rcv_msg+0x88c/0xec0 net/netlink/genetlink.c:1210
 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0x7f0/0x990 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2585
 ___sys_sendmsg net/socket.c:2639 [inline]
 __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2668
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f99a46ff219
Code: 48 83 c4 28 c3 e8 e7 18 00 00 0f 1f 80 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff97ad8a78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fff97ad8c48 RCX: 00007f99a46ff219
RDX: 0000000000000000 RSI: 0000000020000e80 RDI: 0000000000000003
RBP: 00007f99a4771610 R08: 0000000000000000 R09: 00007fff97ad8c48
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fff97ad8c38 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:coalesce_fill_reply+0xcc/0x1b70 net/ethtool/coalesce.c:214
Code: e8 19 2c f9 f7 4c 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 e3 f1 5e f8 bb 98 0c 00 00 49 03 1e 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 c5 f1 5e f8 48 8b 03 48 89 44 24
RSP: 0018:ffffc90003526ee0 EFLAGS: 00010206
RAX: 0000000000000193 RBX: 0000000000000c98 RCX: ffff88802661da00
RDX: 0000000000000000 RSI: ffff88801b72e740 RDI: ffff88802dac6780
RBP: ffffc90003527118 R08: ffffffff899bb137 R09: 1ffff11003e8b805
R10: dffffc0000000000 R11: ffffffff899cf860 R12: ffffffff899cf860
R13: dffffc0000000000 R14: ffff88801b72e740 R15: ffff88802dac6780
FS:  000055557bf45380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a18cbf60a8 CR3: 0000000066db0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	e8 19 2c f9 f7       	call   0xf7f92c1e
   5:	4c 89 f0             	mov    %r14,%rax
   8:	48 c1 e8 03          	shr    $0x3,%rax
   c:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  11:	74 08                	je     0x1b
  13:	4c 89 f7             	mov    %r14,%rdi
  16:	e8 e3 f1 5e f8       	call   0xf85ef1fe
  1b:	bb 98 0c 00 00       	mov    $0xc98,%ebx
  20:	49 03 1e             	add    (%r14),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 c5 f1 5e f8       	call   0xf85ef1fe
  39:	48 8b 03             	mov    (%rbx),%rax
  3c:	48                   	rex.W
  3d:	89                   	.byte 0x89
  3e:	44                   	rex.R
  3f:	24                   	.byte 0x24

Crashes (27):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/26 08:30 net-next 50b70845fc5c dec8bc94 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/30 22:56 net-next 30972a4ea092 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/30 17:42 net-next 30972a4ea092 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/30 09:33 net-next 30972a4ea092 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/29 11:55 net-next 748e3bbf4721 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/29 06:52 net-next 748e3bbf4721 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/28 08:56 net-next cce346d44139 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/28 08:56 net-next cce346d44139 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/27 16:06 net-next f261aa15b2ca 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/27 16:05 net-next f261aa15b2ca 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/27 15:45 net-next f261aa15b2ca 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/27 15:45 net-next f261aa15b2ca 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/27 10:03 net-next f261aa15b2ca 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/27 10:03 net-next f261aa15b2ca 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/26 06:36 net-next 50b70845fc5c dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/26 06:34 net-next 50b70845fc5c dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/26 06:28 net-next 50b70845fc5c dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/06/26 06:28 net-next 50b70845fc5c dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in coalesce_fill_reply
2024/07/01 18:06 linux-next 74564adfd352 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/28 09:17 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/28 09:17 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/28 08:56 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/28 01:45 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/28 00:02 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/27 23:46 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/27 22:17 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
2024/06/27 22:17 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in coalesce_fill_reply
* Struck through repros no longer work on HEAD.