syzbot


general protection fault in skb_segment

Status: upstream: reported C repro on 2023/12/13 03:03
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+ddab8c245da95f68494a@syzkaller.appspotmail.com
First crash: 167d, last: 77d
Cause bisection: introduced by (bisect log) :
commit dfed913e8b55a0c2c4906f1242fd38fd9a116e49
Author: Hangbin Liu <liuhangbin@gmail.com>
Date: Mon Apr 25 01:45:02 2022 +0000

  net/af_packet: add VLAN support for AF_PACKET SOCK_RAW GSO

Crash: BUG: unable to handle kernel NULL pointer dereference in skb_segment (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 3e617c7e39eb6e605f86d5e726476ebd002d9ddf
Author: Eric Dumazet <edumazet@google.com>
Date: Tue Dec 19 12:53:31 2023 +0000

  net: check dev->gso_max_size in gso_features_check()

  
Bug presence (5)
Date Name Commit Repro Result
2024/01/27 android14-6.1 (ToT) 2730733d54b6 C [report] general protection fault in skb_segment
2023/12/13 lts (merge base) 082280fe94a0 C [report] general protection fault in skb_segment
2024/03/12 lts (merge base) 883d1a956208 C Didn't crash
2023/12/13 upstream (ToT) 88035e5694a8 C [report] general protection fault in skb_segment
2024/01/27 upstream (ToT) 3a5879d495b2 C Didn't crash
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 general protection fault in skb_segment C done 1 155d 169d 0/2 auto-obsoleted due to no activity on 2024/04/02 16:56
android-5-15 general protection fault in skb_segment origin:upstream C done 1 155d 169d 0/2 auto-obsoleted due to no activity on 2024/04/03 02:38
linux-4.14 general protection fault in skb_segment 1 692d 692d 0/1 auto-obsoleted due to no activity on 2022/11/02 17:51
upstream general protection fault in skb_segment (3) net C done 2 288d 288d 23/26 fixed on 2023/10/12 12:48
upstream general protection fault in skb_segment sctp C 7 2331d 2341d 4/26 fixed on 2018/01/29 03:39
upstream general protection fault in skb_segment (4) net C error 4 163d 170d 25/26 fixed on 2024/01/22 01:16
upstream general protection fault in skb_segment (2) net 1 1197d 1197d 0/26 auto-closed as invalid on 2021/05/17 11:26
android-54 general protection fault in skb_segment C 1 85d 169d 0/2 upstream: reported C repro on 2023/12/10 13:55
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/12/27 03:04 5m retest repro android14-6.1 report log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/04/14 08:42 4h26m bisect fix android14-6.1 job log (1)
2024/03/05 05:49 40m bisect fix android14-6.1 job log (0) log
2024/01/26 13:14 39m bisect fix android14-6.1 job log (0) log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077]
CPU: 0 PID: 295 Comm: syz-executor177 Not tainted 6.1.57-syzkaller-00010-ga9567a35d0b8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:skb_segment+0x2f49/0x46c0 net/core/skbuff.c:4241
Code: bc 24 90 00 00 00 e9 19 de ff ff e8 f1 4f 73 fd 48 8b 44 24 28 48 8d 58 70 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 0d 09 00 00 44 8b 23 4c 8b b4 24 b0 00 00
RSP: 0018:ffffc90000dd7000 EFLAGS: 00010202
RAX: 000000000000000e RBX: 0000000000000070 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffff88810e9c443e RDI: 000000000000ffff
RBP: ffffc90000dd7270 R08: ffffffff8401be79 R09: ffffffff8406447c
R10: 0000000000000002 R11: ffff88811d78a880 R12: 0000000000000000
R13: 000000000000003e R14: ffff88810e9c4430 R15: ffff88810f17b002
FS:  000055555573a380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 00000001096eb000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 udp6_ufo_fragment+0x94d/0xe50 net/ipv6/udp_offload.c:108
 ipv6_gso_segment+0x6ff/0x1960 net/ipv6/ip6_offload.c:138
 skb_mac_gso_segment+0x296/0x550 net/core/gro.c:141
 __skb_gso_segment+0x32d/0x4c0 net/core/dev.c:3425
 skb_gso_segment include/linux/netdevice.h:4852 [inline]
 validate_xmit_skb+0x323/0xe40 net/core/dev.c:3683
 __dev_queue_xmit+0x1636/0x36e0 net/core/dev.c:4260
 dev_queue_xmit+0x17/0x20 include/linux/netdevice.h:3076
 packet_snd net/packet/af_packet.c:3077 [inline]
 packet_sendmsg+0x48dd/0x6510 net/packet/af_packet.c:3108
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 __sys_sendto+0x471/0x5f0 net/socket.c:2134
 __do_sys_sendto net/socket.c:2146 [inline]
 __se_sys_sendto net/socket.c:2142 [inline]
 __x64_sys_sendto+0xe5/0x100 net/socket.c:2142
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8391916419
Code: 48 83 c4 28 c3 e8 d7 19 00 00 0f 1f 80 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdf6e22238 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f8391963390 RCX: 00007f8391916419
RDX: 0000000000010048 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000020000540 R09: 0000000000000014
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffdf6e22290
R13: 00007ffdf6e22260 R14: 0000000000000001 R15: 00007ffdf6e22290
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:skb_segment+0x2f49/0x46c0 net/core/skbuff.c:4241
Code: bc 24 90 00 00 00 e9 19 de ff ff e8 f1 4f 73 fd 48 8b 44 24 28 48 8d 58 70 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 0d 09 00 00 44 8b 23 4c 8b b4 24 b0 00 00
RSP: 0018:ffffc90000dd7000 EFLAGS: 00010202
RAX: 000000000000000e RBX: 0000000000000070 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffff88810e9c443e RDI: 000000000000ffff
RBP: ffffc90000dd7270 R08: ffffffff8401be79 R09: ffffffff8406447c
R10: 0000000000000002 R11: ffff88811d78a880 R12: 0000000000000000
R13: 000000000000003e R14: ffff88810e9c4430 R15: ffff88810f17b002
FS:  000055555573a380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020010000 CR3: 00000001096eb000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 4 bytes skipped:
   0:	00 00                	add    %al,(%rax)
   2:	e9 19 de ff ff       	jmp    0xffffde20
   7:	e8 f1 4f 73 fd       	call   0xfd734ffd
   c:	48 8b 44 24 28       	mov    0x28(%rsp),%rax
  11:	48 8d 58 70          	lea    0x70(%rax),%rbx
  15:	48 89 d8             	mov    %rbx,%rax
  18:	48 c1 e8 03          	shr    $0x3,%rax
  1c:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  23:	fc ff df
* 26:	0f b6 04 08          	movzbl (%rax,%rcx,1),%eax <-- trapping instruction
  2a:	84 c0                	test   %al,%al
  2c:	0f 85 0d 09 00 00    	jne    0x93f
  32:	44 8b 23             	mov    (%rbx),%r12d
  35:	4c                   	rex.WR
  36:	8b                   	.byte 0x8b
  37:	b4 24                	mov    $0x24,%ah
  39:	b0 00                	mov    $0x0,%al

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/13 03:02 android14-6.1 a9567a35d0b8 ebcad15c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in skb_segment
* Struck through repros no longer work on HEAD.