syzbot


general protection fault in dev_map_redirect

Status: upstream: reported on 2024/07/01 20:19
Subsystems: net bpf
[Documentation on labels]
Reported-by: syzbot+08811615f0e17bc6708b@syzkaller.appspotmail.com
First crash: 6d16h, last: 7h46m
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net-net] tun: Assign missing bpf_net_context. 4 (4) 2024/07/04 10:14
[syzbot] [net?] [bpf?] general protection fault in dev_map_redirect 1 (2) 2024/07/02 18:40

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000007: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000038-0x000000000000003f]
CPU: 0 UID: 0 PID: 10904 Comm: syz.0.1140 Not tainted 6.10.0-rc6-next-20240703-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:bpf_net_ctx_get_ri include/linux/filter.h:788 [inline]
RIP: 0010:__bpf_xdp_redirect_map include/linux/filter.h:1699 [inline]
RIP: 0010:dev_map_redirect+0x65/0x6a0 kernel/bpf/devmap.c:1015
Code: 48 c1 e8 03 80 3c 28 00 74 08 48 89 df e8 83 b3 3d 00 4c 8b 2b 4d 8d 7d 38 4c 89 fb 48 c1 eb 03 48 b8 00 00 00 00 00 fc ff df <0f> b6 04 03 84 c0 0f 85 6e 04 00 00 41 8b 2f 89 ee 83 e6 02 31 ff
RSP: 0018:ffffc9000c2cf088 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000007 RCX: 0000000000040000
RDX: ffffc9001219b000 RSI: 00000000000004cb RDI: 00000000000004cc
RBP: dffffc0000000000 R08: 0000000000000007 R09: ffffffff81b5ee2f
R10: 0000000000000004 R11: ffff88802efc9e00 R12: 000000000c2cf0d8
R13: 0000000000000000 R14: 0000000000000008 R15: 0000000000000038
FS:  00007fad802f86c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c3f2591 CR3: 000000002ec74000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bpf_prog_ec9efaa32d58ce69+0x56/0x5a
 __bpf_prog_run include/linux/filter.h:691 [inline]
 bpf_prog_run_xdp include/net/xdp.h:514 [inline]
 bpf_prog_run_generic_xdp+0x679/0x14c0 net/core/dev.c:4962
 netif_receive_generic_xdp net/core/dev.c:5075 [inline]
 do_xdp_generic+0x673/0xb90 net/core/dev.c:5134
 __netif_receive_skb_core+0x1be6/0x4570 net/core/dev.c:5475
 __netif_receive_skb_one_core net/core/dev.c:5653 [inline]
 __netif_receive_skb+0x12f/0x650 net/core/dev.c:5769
 netif_receive_skb_internal net/core/dev.c:5855 [inline]
 netif_receive_skb+0x1e8/0x890 net/core/dev.c:5915
 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1549
 tun_get_user+0x2f3b/0x4560 drivers/net/tun.c:2002
 tun_chr_write_iter+0x113/0x1f0 drivers/net/tun.c:2048
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0xa72/0xc90 fs/read_write.c:590
 ksys_write+0x1a0/0x2c0 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fad7f57475f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 8c 02 00 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 7c 8c 02 00 48
RSP: 002b:00007fad802f8010 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fad7f703f60 RCX: 00007fad7f57475f
RDX: 000000000000002a RSI: 0000000020000300 RDI: 00000000000000c8
RBP: 00007fad7f5e4a98 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000002a R11: 0000000000000293 R12: 0000000000000000
R13: 000000000000000b R14: 00007fad7f703f60 R15: 00007ffcb0fd4788
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bpf_net_ctx_get_ri include/linux/filter.h:788 [inline]
RIP: 0010:__bpf_xdp_redirect_map include/linux/filter.h:1699 [inline]
RIP: 0010:dev_map_redirect+0x65/0x6a0 kernel/bpf/devmap.c:1015
Code: 48 c1 e8 03 80 3c 28 00 74 08 48 89 df e8 83 b3 3d 00 4c 8b 2b 4d 8d 7d 38 4c 89 fb 48 c1 eb 03 48 b8 00 00 00 00 00 fc ff df <0f> b6 04 03 84 c0 0f 85 6e 04 00 00 41 8b 2f 89 ee 83 e6 02 31 ff
RSP: 0018:ffffc9000c2cf088 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000007 RCX: 0000000000040000
RDX: ffffc9001219b000 RSI: 00000000000004cb RDI: 00000000000004cc
RBP: dffffc0000000000 R08: 0000000000000007 R09: ffffffff81b5ee2f
R10: 0000000000000004 R11: ffff88802efc9e00 R12: 000000000c2cf0d8
R13: 0000000000000000 R14: 0000000000000008 R15: 0000000000000038
FS:  00007fad802f86c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c3f2591 CR3: 000000002ec74000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 c1 e8 03          	shr    $0x3,%rax
   4:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
   8:	74 08                	je     0x12
   a:	48 89 df             	mov    %rbx,%rdi
   d:	e8 83 b3 3d 00       	call   0x3db395
  12:	4c 8b 2b             	mov    (%rbx),%r13
  15:	4d 8d 7d 38          	lea    0x38(%r13),%r15
  19:	4c 89 fb             	mov    %r15,%rbx
  1c:	48 c1 eb 03          	shr    $0x3,%rbx
  20:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  27:	fc ff df
* 2a:	0f b6 04 03          	movzbl (%rbx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 6e 04 00 00    	jne    0x4a4
  36:	41 8b 2f             	mov    (%r15),%ebp
  39:	89 ee                	mov    %ebp,%esi
  3b:	83 e6 02             	and    $0x2,%esi
  3e:	31 ff                	xor    %edi,%edi

Crashes (167):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/04 04:43 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/04 03:11 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/04 01:54 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 23:00 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 20:59 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 19:50 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 18:49 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 17:02 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 15:47 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 15:02 linux-next 0b58e108042b 409d975c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 10:24 linux-next 0b58e108042b 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 04:56 linux-next 82e4255305c5 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 02:51 linux-next 82e4255305c5 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/03 02:46 linux-next 82e4255305c5 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 22:34 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 21:25 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 20:24 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 18:52 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 15:50 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 14:01 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/02 13:58 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/01 21:38 linux-next 74564adfd352 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/01 18:20 linux-next 74564adfd352 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/01 16:37 linux-next 74564adfd352 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/07/01 14:56 linux-next 74564adfd352 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 08:36 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 07:56 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 05:38 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 04:14 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 02:48 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 01:05 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 01:04 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:12 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:12 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:07 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:05 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:02 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:02 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/28 00:01 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/27 23:58 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/27 23:56 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/27 23:56 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/27 23:56 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/27 23:55 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
2024/06/27 20:08 linux-next 642a16ca7994 b62c7d46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in dev_map_redirect
* Struck through repros no longer work on HEAD.