syzbot


general protection fault in __mptcp_set_connected

Status: fixed on 2024/01/20 21:18
Subsystems: mptcp
[Documentation on labels]
Reported-by: syzbot+9dfbaedb6e6baca57a32@syzkaller.appspotmail.com
Fix commit: d109a7767273 mptcp: fix possible NULL pointer dereference on close
First crash: 115d, last: 107d
Discussions (1)
Title Replies (including bot) Last reply
[PATCH net 0/5] mptcp: misc. fixes for v6.7 3 (3) 2023/11/15 04:20

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc00000000f1: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000788-0x000000000000078f]
CPU: 1 PID: 26611 Comm: syz-executor.0 Not tainted 6.6.0-syzkaller-15864-g719639853d88 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:mptcp_subflow_ctx net/mptcp/protocol.h:542 [inline]
RIP: 0010:__mptcp_propagate_sndbuf net/mptcp/protocol.h:813 [inline]
RIP: 0010:__mptcp_set_connected+0x57/0x3e0 net/mptcp/subflow.c:424
Code: 03 80 3c 02 00 0f 85 6f 03 00 00 48 8b 9d e8 09 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 88 07 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 3c 03 00 00 48 8d bb 6c 02 00 00 4c 8b ab 88 07
RSP: 0018:ffffc9000bbf7c88 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8a6782fc
RDX: 00000000000000f1 RSI: ffffffff8a6851d6 RDI: 0000000000000788
RBP: ffff88803f172f00 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88803f172f98
R13: ffff8880429f8618 R14: 0000000000000000 R15: ffff88803f172f00
FS:  000055555714d480(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001ec0 CR3: 0000000059d14000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 mptcp_release_cb+0xa2c/0xc40 net/mptcp/protocol.c:3405
 release_sock+0xba/0x1f0 net/core/sock.c:3537
 mptcp_close+0x32/0xf0 net/mptcp/protocol.c:3084
 inet_release+0x132/0x270 net/ipv4/af_inet.c:433
 __sock_release+0xae/0x260 net/socket.c:659
 sock_close+0x1c/0x20 net/socket.c:1419
 __fput+0x270/0xbb0 fs/file_table.c:394
 __fput_sync+0x47/0x50 fs/file_table.c:475
 __do_sys_close fs/open.c:1590 [inline]
 __se_sys_close fs/open.c:1575 [inline]
 __x64_sys_close+0x87/0xf0 fs/open.c:1575
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fedc2e7b9da
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 03 7f 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 63 7f 02 00 8b 44 24
RSP: 002b:00007ffdb0854e00 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fedc2e7b9da
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000032 R08: 0000001b32320000 R09: 0000000000000041
R10: 0000000081740a5b R11: 0000000000000293 R12: 00007fedc2a00668
R13: ffffffffffffffff R14: 00007fedc2a00000 R15: 0000000000227c7d
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mptcp_subflow_ctx net/mptcp/protocol.h:542 [inline]
RIP: 0010:__mptcp_propagate_sndbuf net/mptcp/protocol.h:813 [inline]
RIP: 0010:__mptcp_set_connected+0x57/0x3e0 net/mptcp/subflow.c:424
Code: 03 80 3c 02 00 0f 85 6f 03 00 00 48 8b 9d e8 09 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 88 07 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 3c 03 00 00 48 8d bb 6c 02 00 00 4c 8b ab 88 07
RSP: 0018:ffffc9000bbf7c88 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8a6782fc
RDX: 00000000000000f1 RSI: ffffffff8a6851d6 RDI: 0000000000000788
RBP: ffff88803f172f00 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88803f172f98
R13: ffff8880429f8618 R14: 0000000000000000 R15: ffff88803f172f00
FS:  000055555714d480(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001ec0 CR3: 0000000059d14000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	03 80 3c 02 00 0f    	add    0xf00023c(%rax),%eax
   6:	85 6f 03             	test   %ebp,0x3(%rdi)
   9:	00 00                	add    %al,(%rax)
   b:	48 8b 9d e8 09 00 00 	mov    0x9e8(%rbp),%rbx
  12:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  19:	fc ff df
  1c:	48 8d bb 88 07 00 00 	lea    0x788(%rbx),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 3c 03 00 00    	jne    0x370
  34:	48 8d bb 6c 02 00 00 	lea    0x26c(%rbx),%rdi
  3b:	4c                   	rex.WR
  3c:	8b                   	.byte 0x8b
  3d:	ab                   	stos   %eax,%es:(%rdi)
  3e:	88 07                	mov    %al,(%rdi)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/10 22:28 net 719639853d88 45e9b83e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce general protection fault in __mptcp_set_connected
2023/11/02 16:34 net-next ff269e2cd5ad b5f07fd3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in __mptcp_set_connected
* Struck through repros no longer work on HEAD.