syzbot


general protection fault in metadata_dst_free

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: c52add61c27e macsec: don't free NULL metadata_dst
First crash: 652d, last: 613d

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000000f: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000078-0x000000000000007f]
CPU: 0 PID: 3623 Comm: syz-executor173 Not tainted 6.0.0-rc3-syzkaller-00830-g2018b22a759e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:metadata_dst_free+0x1f/0x80 net/core/dst.c:316
Code: 5c 41 5d e9 83 6d 23 fa 0f 1f 00 55 48 89 fd 53 e8 76 6d 23 fa 48 8d 7d 78 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 04 3c 03 7e 3f 8b 5d 78 31 ff 89 de e8 09 6a
RSP: 0018:ffffc90003d3f5f8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff8880746d8000 RCX: 0000000000000000
RDX: 000000000000000f RSI: ffffffff87589a9a RDI: 0000000000000078
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90003d3f678
R13: ffffffff84f434d0 R14: ffff8880746d85b0 R15: ffffc90003d3f678
FS:  0000555556c37300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001140 CR3: 0000000071279000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 macsec_free_netdev+0x3a/0x150 drivers/net/macsec.c:3737
 netdev_run_todo+0x6bb/0x1100 net/core/dev.c:10375
 rtnl_unlock net/core/rtnetlink.c:147 [inline]
 rtnetlink_rcv_msg+0x447/0xca0 net/core/rtnetlink.c:6089
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2540
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:734
 ____sys_sendmsg+0x6eb/0x810 net/socket.c:2482
 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536
 __sys_sendmsg+0xf3/0x1c0 net/socket.c:2565
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f1fa7560bc9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 00 00 90 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:00007ffe9b647b08 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f1fa7560bc9
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000004
RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d
R10: 000000000000000d R11: 0000000000000246 R12: 00007ffe9b647b20
R13: 00000000000f4240 R14: 000000000000cba5 R15: 00007ffe9b647b14
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:metadata_dst_free+0x1f/0x80 net/core/dst.c:316
Code: 5c 41 5d e9 83 6d 23 fa 0f 1f 00 55 48 89 fd 53 e8 76 6d 23 fa 48 8d 7d 78 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 04 3c 03 7e 3f 8b 5d 78 31 ff 89 de e8 09 6a
RSP: 0018:ffffc90003d3f5f8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff8880746d8000 RCX: 0000000000000000
RDX: 000000000000000f RSI: ffffffff87589a9a RDI: 0000000000000078
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90003d3f678
R13: ffffffff84f434d0 R14: ffff8880746d85b0 R15: ffffc90003d3f678
FS:  0000555556c37300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1fa7561f60 CR3: 0000000071279000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	5c                   	pop    %rsp
   1:	41 5d                	pop    %r13
   3:	e9 83 6d 23 fa       	jmpq   0xfa236d8b
   8:	0f 1f 00             	nopl   (%rax)
   b:	55                   	push   %rbp
   c:	48 89 fd             	mov    %rdi,%rbp
   f:	53                   	push   %rbx
  10:	e8 76 6d 23 fa       	callq  0xfa236d8b
  15:	48 8d 7d 78          	lea    0x78(%rbp),%rdi
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	74 04                	je     0x36
  32:	3c 03                	cmp    $0x3,%al
  34:	7e 3f                	jle    0x75
  36:	8b 5d 78             	mov    0x78(%rbp),%ebx
  39:	31 ff                	xor    %edi,%edi
  3b:	89 de                	mov    %ebx,%esi
  3d:	e8                   	.byte 0xe8
  3e:	09                   	.byte 0x9
  3f:	6a                   	.byte 0x6a

Crashes (348):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/08 03:57 net-next-old 2018b22a759e 435aeef7 .config strace log report syz C ci-upstream-net-kasan-gce general protection fault in metadata_dst_free
2022/09/26 16:35 net-next-old 9258b8b1be2e d59ba983 .config console log report info ci-upstream-net-kasan-gce general protection fault in metadata_dst_free
2022/09/08 01:04 net-next-old 2018b22a759e 435aeef7 .config console log report info ci-upstream-net-kasan-gce general protection fault in metadata_dst_free
2022/10/16 16:22 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/16 12:43 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/15 19:24 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/15 12:05 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/15 10:30 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/15 07:52 linux-next aaa11ce2ffc8 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/14 18:33 linux-next aaa11ce2ffc8 4954e4b2 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/14 16:55 linux-next aaa11ce2ffc8 4954e4b2 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/14 12:50 linux-next aaa11ce2ffc8 4954e4b2 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/14 03:22 linux-next aaa11ce2ffc8 adf90437 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 23:52 linux-next aaa11ce2ffc8 adf90437 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 20:21 linux-next aaa11ce2ffc8 adf90437 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 16:58 linux-next aaa11ce2ffc8 adf90437 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 15:45 linux-next aaa11ce2ffc8 adf90437 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 07:25 linux-next aaa11ce2ffc8 3f6b40a1 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 02:34 linux-next aaa11ce2ffc8 89b5a509 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/13 00:52 linux-next aaa11ce2ffc8 89b5a509 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/12 23:52 linux-next aaa11ce2ffc8 89b5a509 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/12 19:04 linux-next aaa11ce2ffc8 89b5a509 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/12 12:54 linux-next aaa11ce2ffc8 16a9c9e0 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/12 10:38 linux-next aaa11ce2ffc8 16a9c9e0 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/12 10:25 linux-next aaa11ce2ffc8 16a9c9e0 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/11 23:20 linux-next aaa11ce2ffc8 1353c374 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/11 20:43 linux-next aaa11ce2ffc8 1353c374 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/11 19:43 linux-next aaa11ce2ffc8 1353c374 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/11 09:15 linux-next aaa11ce2ffc8 2b253ced .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/11 07:58 linux-next aaa11ce2ffc8 2b253ced .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/10 18:10 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/10 16:19 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/10 08:31 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/09 23:09 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/09 17:32 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/09 16:13 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/09 08:44 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/09 05:26 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/08 21:49 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/08 18:18 linux-next aaa11ce2ffc8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/08 00:16 linux-next aaa11ce2ffc8 0de35f24 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/07 03:19 linux-next aaa11ce2ffc8 8a212197 .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/06 19:56 linux-next aaa11ce2ffc8 131b38ac .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/06 07:23 linux-next aaa11ce2ffc8 2c6543ad .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/06 05:28 linux-next aaa11ce2ffc8 2c6543ad .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/06 04:19 linux-next aaa11ce2ffc8 2c6543ad .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/06 00:26 linux-next aaa11ce2ffc8 2c6543ad .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/05 18:26 linux-next aaa11ce2ffc8 267e3bb1 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/05 16:04 linux-next aaa11ce2ffc8 267e3bb1 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/05 05:21 linux-next aaa11ce2ffc8 eab8f949 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/04 21:48 linux-next aaa11ce2ffc8 eab8f949 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
2022/10/04 20:22 linux-next aaa11ce2ffc8 eab8f949 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in metadata_dst_free
* Struck through repros no longer work on HEAD.