syzbot


stack segment fault in skb_clone

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: d8b57135fd9f net: hsr: avoid possible NULL deref in skb_clone()
First crash: 867d, last: 682d
Cause bisection: introduced by (bisect log) [merge commit]:
commit a56ff24efbba18f4361415597f145f4b5773be3e
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue Feb 23 17:56:13 2021 +0000

  Merge tag 'objtool-core-2021-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Crash: WARNING in kvm_wait (log)
Repro: C syz .config
  
Fix bisection the fix commit could be any of (bisect log):
  bc403203d65a Merge tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
  db886979683a x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current
  
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/10/11 04:30 17m retest repro upstream error OK
2022/10/10 17:30 17m retest repro upstream error OK
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2022/07/14 23:17 19m bisect fix upstream job log (2)
2022/06/14 22:46 31m bisect fix upstream job log (0) log
2022/05/11 03:16 28m bisect fix upstream job log (0) log
2022/04/11 02:52 19m bisect fix upstream job log (0) log
2022/03/12 00:26 19m bisect fix upstream job log (0) log
2022/02/10 00:05 20m bisect fix upstream job log (0) log
2022/01/10 23:45 20m bisect fix upstream job log (0) log

Sample crash report:
RDX: 000000000000000e RSI: 0000000020000100 RDI: 00000000000000c8
RBP: 00007f6b12cb96cc R08: 0000000000000000 R09: 0000000000000001
R10: 00007f6b12c11087 R11: 0000000000000293 R12: 00007f6b12cec4ec
R13: 00007f6b12c112f0 R14: 00007f6b12cec4e8 R15: 0000000000000001
 </TASK>
stack segment: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3703 Comm: syz-executor273 Not tainted 5.18.0-rc6-syzkaller-00161-gbc403203d65a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:skb_clone+0xd0/0x370 net/core/skbuff.c:1512
Code: 03 42 80 3c 28 00 74 08 48 89 df e8 8a 0c b7 f9 48 83 3b 00 0f 85 3b 01 00 00 e8 bb 24 66 f9 4d 8d 77 7e 4c 89 f5 48 c1 ed 03 <42> 8a 44 2d 00 84 c0 0f 85 cf 01 00 00 41 0f b6 1e 83 e3 0c bf 04
RSP: 0018:ffffc900032df320 EFLAGS: 00010207
RAX: ffffffff881ff01a RBX: 0000000000000004 RCX: ffff8880235f3b00
RDX: 0000000000000000 RSI: 0000000000000a20 RDI: 0000000000000000
RBP: 000000000000000f R08: 0000000000000a20 R09: 00000000ffffffff
R10: fffffbfff197fc8b R11: 1ffffffff197fc8a R12: ffff88814bffbd00
R13: dffffc0000000000 R14: 000000000000007e R15: 0000000000000000
FS:  00007f6b12c11700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6b12cd1364 CR3: 000000007108e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 hsr_forward_skb+0xf14/0x2150 net/hsr/hsr_forward.c:623
 hsr_handle_frame+0x4fd/0x6b0 net/hsr/hsr_slave.c:69
 __netif_receive_skb_core+0x1448/0x3bc0 net/core/dev.c:5297
 __netif_receive_skb_one_core net/core/dev.c:5403 [inline]
 __netif_receive_skb+0x11a/0x500 net/core/dev.c:5519
 netif_receive_skb_internal+0x108/0x360 net/core/dev.c:5605
 netif_receive_skb+0x19/0x30 net/core/dev.c:5664
 tun_rx_batched+0x777/0x920
 tun_get_user+0x1b5a/0x2540 drivers/net/tun.c:1985
 tun_chr_write_iter+0x10a/0x1e0 drivers/net/tun.c:2015
 call_write_iter include/linux/fs.h:2050 [inline]
 new_sync_write fs/read_write.c:504 [inline]
 vfs_write+0xa22/0xd40 fs/read_write.c:591
 ksys_write+0x19b/0x2c0 fs/read_write.c:644
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f6b12c241ff
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 99 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 cc fd ff ff 48
RSP: 002b:00007f6b12c112c0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f6b12cec4e0 RCX: 00007f6b12c241ff
RDX: 000000000000000e RSI: 0000000020000100 RDI: 00000000000000c8
RBP: 00007f6b12cb96cc R08: 0000000000000000 R09: 0000000000000001
R10: 00007f6b12c11087 R11: 0000000000000293 R12: 00007f6b12cec4ec
R13: 00007f6b12c112f0 R14: 00007f6b12cec4e8 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:skb_clone+0xd0/0x370 net/core/skbuff.c:1512
Code: 03 42 80 3c 28 00 74 08 48 89 df e8 8a 0c b7 f9 48 83 3b 00 0f 85 3b 01 00 00 e8 bb 24 66 f9 4d 8d 77 7e 4c 89 f5 48 c1 ed 03 <42> 8a 44 2d 00 84 c0 0f 85 cf 01 00 00 41 0f b6 1e 83 e3 0c bf 04
RSP: 0018:ffffc900032df320 EFLAGS: 00010207
RAX: ffffffff881ff01a RBX: 0000000000000004 RCX: ffff8880235f3b00
RDX: 0000000000000000 RSI: 0000000000000a20 RDI: 0000000000000000
RBP: 000000000000000f R08: 0000000000000a20 R09: 00000000ffffffff
R10: fffffbfff197fc8b R11: 1ffffffff197fc8a R12: ffff88814bffbd00
R13: dffffc0000000000 R14: 000000000000007e R15: 0000000000000000
FS:  00007f6b12c11700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6b12cd1364 CR3: 000000007108e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	03 42 80             	add    -0x80(%rdx),%eax
   3:	3c 28                	cmp    $0x28,%al
   5:	00 74 08 48          	add    %dh,0x48(%rax,%rcx,1)
   9:	89 df                	mov    %ebx,%edi
   b:	e8 8a 0c b7 f9       	callq  0xf9b70c9a
  10:	48 83 3b 00          	cmpq   $0x0,(%rbx)
  14:	0f 85 3b 01 00 00    	jne    0x155
  1a:	e8 bb 24 66 f9       	callq  0xf96624da
  1f:	4d 8d 77 7e          	lea    0x7e(%r15),%r14
  23:	4c 89 f5             	mov    %r14,%rbp
  26:	48 c1 ed 03          	shr    $0x3,%rbp
* 2a:	42 8a 44 2d 00       	mov    0x0(%rbp,%r13,1),%al <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 cf 01 00 00    	jne    0x206
  37:	41 0f b6 1e          	movzbl (%r14),%ebx
  3b:	83 e3 0c             	and    $0xc,%ebx
  3e:	bf                   	.byte 0xbf
  3f:	04                   	.byte 0x4

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/05/15 22:46 upstream bc403203d65a 744a39e2 .config strace log report syz C ci-upstream-kasan-gce-smack-root stack segment fault in skb_clone
2021/12/11 23:37 upstream 6f513529296f 49ca1f59 .config console log report syz C ci-upstream-kasan-gce-smack-root stack segment fault in skb_clone
2021/12/11 21:48 upstream 6f513529296f 49ca1f59 .config console log report info ci-upstream-kasan-gce-smack-root stack segment fault in skb_clone
* Struck through repros no longer work on HEAD.