syzbot


general protection fault in __xfrm_state_insert

Status: upstream: reported on 2025/09/05 19:36
Reported-by: syzbot+576a0da46ec47b09d020@syzkaller.appspotmail.com
First crash: 25d, last: 8d09h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in __xfrm_state_insert net 24 2002 10m 64d 0/29 upstream: reported on 2025/07/29 07:08

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 12455 Comm: syz.1.2002 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:hlist_add_before_rcu include/linux/rculist.h:656 [inline]
RIP: 0010:__xfrm_state_insert+0x1250/0x1700 net/xfrm/xfrm_state.c:1512
Code: 00 00 00 00 00 fc ff df 80 3c 03 00 74 08 4c 89 ff e8 d4 2d bf f8 49 8b 1f 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 52 2e bf f8 4c 89 2b 48 b8 00 00 00
RSP: 0018:ffffc900052174e0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000000
RDX: ffffc90010833000 RSI: 00000000000249b0 RDI: 00000000000249b1
RBP: 1ffff1100bac0906 R08: dffffc0000000000 R09: 0000000000000002
R10: 000000000000000a R11: 0000000000000002 R12: ffff88805d604828
R13: ffff88805d605428 R14: ffff88805d605400 R15: ffff88805d605430
FS:  00007fb3a7ca06c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb34b3912f8 CR3: 0000000060c36000 CR4: 00000000003506e0
Call Trace:
 <TASK>
 xfrm_state_insert+0x54/0x60 net/xfrm/xfrm_state.c:1561
 ipcomp6_tunnel_attach net/ipv6/ipcomp6.c:129 [inline]
 ipcomp6_init_state+0x5ab/0x7f0 net/ipv6/ipcomp6.c:161
 __xfrm_init_state+0xd8b/0x11c0 net/xfrm/xfrm_state.c:2904
 xfrm_init_state+0x1f/0x80 net/xfrm/xfrm_state.c:2932
 pfkey_msg2xfrm_state net/key/af_key.c:1286 [inline]
 pfkey_add+0x1cee/0x2da0 net/key/af_key.c:1503
 pfkey_process net/key/af_key.c:2847 [inline]
 pfkey_sendmsg+0xbed/0x1050 net/key/af_key.c:3698
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 ____sys_sendmsg+0x5bf/0x950 net/socket.c:2595
 ___sys_sendmsg+0x220/0x290 net/socket.c:2649
 __sys_sendmsg net/socket.c:2678 [inline]
 __do_sys_sendmsg net/socket.c:2687 [inline]
 __se_sys_sendmsg+0x1a5/0x270 net/socket.c:2685
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fb3a6d8ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb3a7ca0038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fb3a6fc6180 RCX: 00007fb3a6d8ebe9
RDX: 0000000000000000 RSI: 00002000000001c0 RDI: 000000000000000c
RBP: 00007fb3a6e11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb3a6fc6218 R14: 00007fb3a6fc6180 R15: 00007ffc4b844088
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:hlist_add_before_rcu include/linux/rculist.h:656 [inline]
RIP: 0010:__xfrm_state_insert+0x1250/0x1700 net/xfrm/xfrm_state.c:1512
Code: 00 00 00 00 00 fc ff df 80 3c 03 00 74 08 4c 89 ff e8 d4 2d bf f8 49 8b 1f 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 52 2e bf f8 4c 89 2b 48 b8 00 00 00
RSP: 0018:ffffc900052174e0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000000
RDX: ffffc90010833000 RSI: 00000000000249b0 RDI: 00000000000249b1
RBP: 1ffff1100bac0906 R08: dffffc0000000000 R09: 0000000000000002
R10: 000000000000000a R11: 0000000000000002 R12: ffff88805d604828
R13: ffff88805d605428 R14: ffff88805d605400 R15: ffff88805d605430
FS:  00007fb3a7ca06c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb34b3912f8 CR3: 0000000060c36000 CR4: 00000000003506e0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	df 80 3c 03 00 74    	filds  0x7400033c(%rax)
   6:	08 4c 89 ff          	or     %cl,-0x1(%rcx,%rcx,4)
   a:	e8 d4 2d bf f8       	call   0xf8bf2de3
   f:	49 8b 1f             	mov    (%r15),%rbx
  12:	48 89 d8             	mov    %rbx,%rax
  15:	48 c1 e8 03          	shr    $0x3,%rax
  19:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  20:	fc ff df
* 23:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1) <-- trapping instruction
  27:	74 08                	je     0x31
  29:	48 89 df             	mov    %rbx,%rdi
  2c:	e8 52 2e bf f8       	call   0xf8bf2e83
  31:	4c 89 2b             	mov    %r13,(%rbx)
  34:	48                   	rex.W
  35:	b8                   	.byte 0xb8
  36:	00 00                	add    %al,(%rax)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/05 19:36 linux-6.6.y 355bd0b51d2f d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in __xfrm_state_insert
2025/09/22 22:41 linux-6.6.y af1544b5d072 0ac7291c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in __xfrm_state_insert
* Struck through repros no longer work on HEAD.