syzbot


general protection fault in skb_segment (3)

Status: fixed on 2023/10/12 12:48
Subsystems: net
[Documentation on labels]
Fix commit: b616be6b9768 net: do not allow gso_size to be set to GSO_BY_FRAGS
First crash: 484d, last: 484d
Cause bisection: introduced by (bisect log) :
commit ae6db08f8b5606ccd95ef2aadd741905d3c13bc0
Author: Eric Dumazet <edumazet@google.com>
Date: Tue Aug 1 20:52:53 2023 +0000

  net/packet: change packet_alloc_skb() to allow bigger paged allocations

Crash: BUG: unable to handle kernel NULL pointer dereference in skb_segment (log)
Repro: C syz .config
  
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 351d 365d 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 351d 365d 0/2 auto-obsoleted due to no activity on 2024/04/03 02:38
linux-4.14 general protection fault in skb_segment 1 888d 888d 0/1 auto-obsoleted due to no activity on 2022/11/02 17:51
upstream general protection fault in skb_segment sctp C 7 2527d 2537d 4/28 fixed on 2018/01/29 03:39
android-6-1 general protection fault in skb_segment origin:upstream missing-backport C done done 1 273d 363d 0/2 auto-obsoleted due to no activity on 2024/06/20 07:05
upstream general protection fault in skb_segment (4) net C error 4 359d 366d 25/28 fixed on 2024/01/22 01:16
upstream general protection fault in skb_segment (2) net 1 1393d 1393d 0/28 auto-closed as invalid on 2021/05/17 11:26
android-54 general protection fault in skb_segment C 1 281d 365d 0/2 auto-obsoleted due to no activity on 2024/06/11 14:46

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: 5039 Comm: syz-executor401 Not tainted 6.5.0-rc5-next-20230809-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:skb_segment+0x1a52/0x3ef0 net/core/skbuff.c:4500
Code: 00 00 00 e9 ab eb ff ff e8 6b 96 5d f9 48 8b 84 24 00 01 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e ea 21 00 00 48 8b 84 24 00 01
RSP: 0018:ffffc90003d3f1c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 000000000001fffe RCX: 0000000000000000
RDX: 000000000000000e RSI: ffffffff882a3115 RDI: 0000000000000070
RBP: ffffc90003d3f378 R08: 0000000000000005 R09: 000000000000ffff
R10: 000000000000ffff R11: 5ee4a93e456187d6 R12: 000000000001ffc6
R13: dffffc0000000000 R14: 0000000000000008 R15: 000000000000ffff
FS:  00005555563f2380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020020000 CR3: 000000001626d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 udp6_ufo_fragment+0x9d2/0xd50 net/ipv6/udp_offload.c:109
 ipv6_gso_segment+0x5c4/0x17b0 net/ipv6/ip6_offload.c:120
 skb_mac_gso_segment+0x292/0x610 net/core/gso.c:53
 __skb_gso_segment+0x339/0x710 net/core/gso.c:124
 skb_gso_segment include/net/gso.h:83 [inline]
 validate_xmit_skb+0x3a5/0xf10 net/core/dev.c:3625
 __dev_queue_xmit+0x8f0/0x3d60 net/core/dev.c:4329
 dev_queue_xmit include/linux/netdevice.h:3082 [inline]
 packet_xmit+0x257/0x380 net/packet/af_packet.c:276
 packet_snd net/packet/af_packet.c:3087 [inline]
 packet_sendmsg+0x24c7/0x5570 net/packet/af_packet.c:3119
 sock_sendmsg_nosec net/socket.c:727 [inline]
 sock_sendmsg+0xd9/0x180 net/socket.c:750
 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2496
 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2550
 __sys_sendmsg+0x117/0x1e0 net/socket.c:2579
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff27cdb34d9
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:00007ffc90af2648 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ff27ce00390 RCX: 00007ff27cdb34d9
RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000555500000000 R09: 0000555500000000
R10: 0000000000000004 R11: 0000000000000246 R12: 00007ffc90af2690
R13: 00007ffc90af2660 R14: 0000000000000001 R15: 00007ffc90af2690
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:skb_segment+0x1a52/0x3ef0 net/core/skbuff.c:4500
Code: 00 00 00 e9 ab eb ff ff e8 6b 96 5d f9 48 8b 84 24 00 01 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e ea 21 00 00 48 8b 84 24 00 01
RSP: 0018:ffffc90003d3f1c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 000000000001fffe RCX: 0000000000000000
RDX: 000000000000000e RSI: ffffffff882a3115 RDI: 0000000000000070
RBP: ffffc90003d3f378 R08: 0000000000000005 R09: 000000000000ffff
R10: 000000000000ffff R11: 5ee4a93e456187d6 R12: 000000000001ffc6
R13: dffffc0000000000 R14: 0000000000000008 R15: 000000000000ffff
FS:  00005555563f2380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020020000 CR3: 000000001626d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	00 00                	add    %al,(%rax)
   2:	e9 ab eb ff ff       	jmp    0xffffebb2
   7:	e8 6b 96 5d f9       	call   0xf95d9677
   c:	48 8b 84 24 00 01 00 	mov    0x100(%rsp),%rax
  13:	00
  14:	48 8d 78 70          	lea    0x70(%rax),%rdi
  18:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1f:	fc ff df
  22:	48 89 fa             	mov    %rdi,%rdx
  25:	48 c1 ea 03          	shr    $0x3,%rdx
* 29:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2d:	84 c0                	test   %al,%al
  2f:	74 08                	je     0x39
  31:	3c 03                	cmp    $0x3,%al
  33:	0f 8e ea 21 00 00    	jle    0x2223
  39:	48                   	rex.W
  3a:	8b                   	.byte 0x8b
  3b:	84 24 00             	test   %ah,(%rax,%rax,1)
  3e:	01                   	.byte 0x1

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/13 17:42 linux-next 21ef7b1e17d0 39990d51 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in skb_segment
2023/08/13 17:12 linux-next 21ef7b1e17d0 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in skb_segment
* Struck through repros no longer work on HEAD.