syzbot


general protection fault in br_mst_info_size

Status: fixed on 2023/02/24 13:51
Subsystems: bridge
[Documentation on labels]
Fix commit: cde3fc244b3d net: bridge: mst: prevent NULL deref in br_mst_info_size()
First crash: 767d, last: 764d
Cause bisection: failed (error log, bisect log)
  

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000058: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000002c0-0x00000000000002c7]
CPU: 0 PID: 3587 Comm: syz-executor394 Tainted: G        W         5.17.0-next-20220321-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:br_mst_info_size+0x97/0x270 net/bridge/br_mst.c:242
Code: 00 00 31 c0 e8 ba 10 53 f9 31 c0 b9 40 00 00 00 4c 8d 6c 24 30 4c 89 ef f3 48 ab 48 8d 83 c0 02 00 00 48 89 04 24 48 c1 e8 03 <80> 3c 28 00 0f 85 ae 01 00 00 48 8b 83 c0 02 00 00 41 bf 04 00 00
RSP: 0018:ffffc9000395f0a8 EFLAGS: 00010202
RAX: 0000000000000058 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88802432d7c0 RSI: ffffffff88259876 RDI: ffffc9000395f2d8
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff8db68957
R10: ffffffff881f737b R11: 0000000000000000 R12: 0000000000000000
R13: ffffc9000395f0d8 R14: 0000000000000328 R15: 00000000ffffffff
FS:  0000555555d2b300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000980 CR3: 000000007b6b2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 br_get_link_af_size_filtered+0x6e9/0xc00 net/bridge/br_netlink.c:123
 rtnl_link_get_af_size net/core/rtnetlink.c:598 [inline]
 if_nlmsg_size+0x40c/0xa50 net/core/rtnetlink.c:1040
 rtnl_calcit.isra.0+0x25f/0x460 net/core/rtnetlink.c:3780
 rtnetlink_rcv_msg+0xa65/0xb80 net/core/rtnetlink.c:5937
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2496
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:705 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:725
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2413
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2496
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fdb30ad1059
Code: 28 c3 e8 2a 14 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:00007ffc6e780eb8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fdb30ad1059
RDX: 0000000000000000 RSI: 0000000020001a80 RDI: 0000000000000003
RBP: 00007fdb30a95040 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdb30a950d0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:br_mst_info_size+0x97/0x270 net/bridge/br_mst.c:242
Code: 00 00 31 c0 e8 ba 10 53 f9 31 c0 b9 40 00 00 00 4c 8d 6c 24 30 4c 89 ef f3 48 ab 48 8d 83 c0 02 00 00 48 89 04 24 48 c1 e8 03 <80> 3c 28 00 0f 85 ae 01 00 00 48 8b 83 c0 02 00 00 41 bf 04 00 00
RSP: 0018:ffffc9000395f0a8 EFLAGS: 00010202
RAX: 0000000000000058 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88802432d7c0 RSI: ffffffff88259876 RDI: ffffc9000395f2d8
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff8db68957
R10: ffffffff881f737b R11: 0000000000000000 R12: 0000000000000000
R13: ffffc9000395f0d8 R14: 0000000000000328 R15: 00000000ffffffff
FS:  0000555555d2b300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000980 CR3: 000000007b6b2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	31 c0                	xor    %eax,%eax
   4:	e8 ba 10 53 f9       	callq  0xf95310c3
   9:	31 c0                	xor    %eax,%eax
   b:	b9 40 00 00 00       	mov    $0x40,%ecx
  10:	4c 8d 6c 24 30       	lea    0x30(%rsp),%r13
  15:	4c 89 ef             	mov    %r13,%rdi
  18:	f3 48 ab             	rep stos %rax,%es:(%rdi)
  1b:	48 8d 83 c0 02 00 00 	lea    0x2c0(%rbx),%rax
  22:	48 89 04 24          	mov    %rax,(%rsp)
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	0f 85 ae 01 00 00    	jne    0x1e2
  34:	48 8b 83 c0 02 00 00 	mov    0x2c0(%rbx),%rax
  3b:	41                   	rex.B
  3c:	bf                   	.byte 0xbf
  3d:	04 00                	add    $0x0,%al

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/21 18:56 linux-next f9006d9269ea e2d91b1d .config console log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/24 17:42 bpf-next 2af7e566a861 89bc8608 .config console log report info ci-upstream-bpf-next-kasan-gce general protection fault in br_mst_info_size
2022/03/24 01:15 net-next-old 36c2e31ad25b 5ff41e94 .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/23 07:31 net-next-old 2af7e566a861 5ff41e94 .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 06:42 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 06:36 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 06:32 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 06:30 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 05:50 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 05:23 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 05:10 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 05:00 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/22 04:43 net-next-old 351bdbb6419c e2d91b1d .config console log report info ci-upstream-net-kasan-gce general protection fault in br_mst_info_size
2022/03/24 01:24 linux-next b61581ae229d 5ff41e94 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/24 01:24 linux-next b61581ae229d 5ff41e94 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/23 07:39 linux-next f8833a2b2356 5ff41e94 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 17:48 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 17:10 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 16:54 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 16:41 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 16:14 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 14:15 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 14:09 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 14:06 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 14:02 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
2022/03/21 13:06 linux-next f9006d9269ea e2d91b1d .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in br_mst_info_size
* Struck through repros no longer work on HEAD.