syzbot


general protection fault in tipc_udp_is_known_peer

Status: fixed on 2024/03/26 17:39
Subsystems: tipc
[Documentation on labels]
Reported-by: syzbot+5142b87a9abc510e14fa@syzkaller.appspotmail.com
Fix commit: 3871aa01e1a7 tipc: Check the bearer type before calling tipc_udp_nl_bearer_add()
First crash: 131d, last: 117d
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net] tipc: Check the bearer type before calling tipc_udp_nl_bearer_add() 5 (5) 2024/02/06 15:32
[syzbot] [tipc?] general protection fault in tipc_udp_is_known_peer 0 (2) 2024/01/31 14:25
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/01/31 14:25 22m syoshida@redhat.com patch net-next OK log
2023/12/31 20:54 35m retest repro net-next report log

Sample crash report:
tipc: Enabled bearer <eth:ip6gre0>, priority 10
tipc: Enabling of bearer <udp:syz2> rejected, already enabled
general protection fault, probably for non-canonical address 0xdffffc0000000010: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000080-0x0000000000000087]
CPU: 1 PID: 5061 Comm: syz-executor528 Not tainted 6.7.0-rc5-syzkaller-01080-g3a3af3aedb00 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:tipc_udp_is_known_peer+0x9c/0x250 net/tipc/udp_media.c:291
Code: 48 c1 ea 03 80 3c 02 00 0f 85 b4 01 00 00 4c 8b b5 98 00 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 5e c8 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 81 01 00 00 49 8b 06 4d 39 f5 48 8d 68 c8 0f 84
RSP: 0018:ffffc900040b7368 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000048 RCX: ffffffff8a218d4f
RDX: 0000000000000010 RSI: ffffffff8a218c3e RDI: 0000000000000001
RBP: ffff88814b630000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900040b73c0
R13: ffff88814b630098 R14: 0000000000000080 R15: 0000000000000000
FS:  0000555555ffd380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3ed64c4ea3 CR3: 0000000026de2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 tipc_udp_nl_bearer_add+0x212/0x2f0 net/tipc/udp_media.c:646
 tipc_nl_bearer_add+0x21e/0x360 net/tipc/bearer.c:1089
 genl_family_rcv_msg_doit+0x1fc/0x2e0 net/netlink/genetlink.c:972
 genl_family_rcv_msg net/netlink/genetlink.c:1052 [inline]
 genl_rcv_msg+0x561/0x800 net/netlink/genetlink.c:1067
 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2544
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076
 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
 netlink_unicast+0x53b/0x810 net/netlink/af_netlink.c:1367
 netlink_sendmsg+0x8b7/0xd70 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0xd5/0x180 net/socket.c:745
 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584
 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638
 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f3ed64c6dd9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff950619b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3ed64c6dd9
RDX: 0000000000000000 RSI: 0000000020000f00 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:tipc_udp_is_known_peer+0x9c/0x250 net/tipc/udp_media.c:291
Code: 48 c1 ea 03 80 3c 02 00 0f 85 b4 01 00 00 4c 8b b5 98 00 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 5e c8 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 81 01 00 00 49 8b 06 4d 39 f5 48 8d 68 c8 0f 84
RSP: 0018:ffffc900040b7368 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000048 RCX: ffffffff8a218d4f
RDX: 0000000000000010 RSI: ffffffff8a218c3e RDI: 0000000000000001
RBP: ffff88814b630000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900040b73c0
R13: ffff88814b630098 R14: 0000000000000080 R15: 0000000000000000
FS:  0000555555ffd380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3ed64c4ea3 CR3: 0000000026de2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 b4 01 00 00    	jne    0x1c2
   e:	4c 8b b5 98 00 00 00 	mov    0x98(%rbp),%r14
  15:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1c:	fc ff df
  1f:	49 8d 5e c8          	lea    -0x38(%r14),%rbx
  23:	4c 89 f2             	mov    %r14,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 81 01 00 00    	jne    0x1b5
  34:	49 8b 06             	mov    (%r14),%rax
  37:	4d 39 f5             	cmp    %r14,%r13
  3a:	48 8d 68 c8          	lea    -0x38(%rax),%rbp
  3e:	0f                   	.byte 0xf
  3f:	84                   	.byte 0x84

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/17 20:53 net-next 3a3af3aedb00 3222d10c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in tipc_udp_is_known_peer
* Struck through repros no longer work on HEAD.