syzbot


general protection fault in dev_map_enqueue

Status: premoderation: reported on 2025/01/23 18:09
Reported-by: syzbot+49efe9ee0264190ffac7@syzkaller.appspotmail.com
First crash: 81d, last: 81d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 general protection fault in dev_map_enqueue missing-backport origin:lts C 1686 17h11m 384d 0/2 upstream: reported C repro on 2024/03/26 23:53
upstream general protection fault in dev_map_enqueue bpf net C 676 327d 384d 25/28 fixed on 2024/05/22 23:26
linux-6.1 general protection fault in dev_map_enqueue origin:upstream missing-backport C unreliable 190 3d20h 384d 0/3 upstream: reported C repro on 2024/03/26 19:03
upstream general protection fault in dev_map_enqueue (2) bpf net C error done 336 257d 323d 28/28 fixed on 2024/11/12 23:31
linux-5.15 KASAN: use-after-free Read in dev_map_enqueue 1 23d 23d 0/3 upstream: reported on 2025/03/22 21:42

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: 0 PID: 21151 Comm: syz.6.9093 Not tainted 5.15.176-syzkaller-00972-g829d9f138569 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:dev_map_enqueue+0x31/0x220 kernel/bpf/devmap.c:531
Code: 56 41 55 41 54 53 48 83 ec 18 49 89 d7 48 89 75 d0 48 89 fb 49 bc 00 00 00 00 00 fc ff df e8 46 23 e1 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 df e8 40 88 23 00 4c 8b 33 48 83 c3 20
RSP: 0018:ffffc9000327f760 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000080000
RDX: ffffc90004f89000 RSI: 0000000000000069 RDI: 000000000000006a
RBP: ffffc9000327f7a0 R08: ffffffff83f14a51 R09: ffffffff83f1497a
R10: 0000000000000004 R11: ffff88810b6a93c0 R12: dffffc0000000000
R13: ffff888127d20000 R14: ffff8881f7036c80 R15: ffff888127d20000
FS:  00007f6061e3a6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3101cff8 CR3: 000000010f182000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __xdp_do_redirect_frame net/core/filter.c:4089 [inline]
 xdp_do_redirect+0x5d1/0xc30 net/core/filter.c:4129
 tun_xdp_act+0xe2/0x770 drivers/net/tun.c:1611
 tun_build_skb drivers/net/tun.c:1695 [inline]
 tun_get_user+0xaf4/0x3aa0 drivers/net/tun.c:1797
 tun_chr_write_iter+0x1e1/0x2e0 drivers/net/tun.c:2019
 call_write_iter include/linux/fs.h:2206 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0xd5d/0x1110 fs/read_write.c:594
 ksys_write+0x199/0x2c0 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:656
 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f60637ce7df
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 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 4c 93 02 00 48
RSP: 002b:00007f6061e3a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f60639e8fa0 RCX: 00007f60637ce7df
RDX: 000000000000003e RSI: 0000000020000400 RDI: 00000000000000c8
RBP: 00007f60638512a0 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000003e R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f60639e8fa0 R15: 00007fff9bab7438
 </TASK>
Modules linked in:
---[ end trace cc18014833e0dbc0 ]---
RIP: 0010:dev_map_enqueue+0x31/0x220 kernel/bpf/devmap.c:531
Code: 56 41 55 41 54 53 48 83 ec 18 49 89 d7 48 89 75 d0 48 89 fb 49 bc 00 00 00 00 00 fc ff df e8 46 23 e1 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 20 00 74 08 48 89 df e8 40 88 23 00 4c 8b 33 48 83 c3 20
RSP: 0018:ffffc9000327f760 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000080000
RDX: ffffc90004f89000 RSI: 0000000000000069 RDI: 000000000000006a
RBP: ffffc9000327f7a0 R08: ffffffff83f14a51 R09: ffffffff83f1497a
R10: 0000000000000004 R11: ffff88810b6a93c0 R12: dffffc0000000000
R13: ffff888127d20000 R14: ffff8881f7036c80 R15: ffff888127d20000
FS:  00007f6061e3a6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3101cff8 CR3: 000000010f182000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	56                   	push   %rsi
   1:	41 55                	push   %r13
   3:	41 54                	push   %r12
   5:	53                   	push   %rbx
   6:	48 83 ec 18          	sub    $0x18,%rsp
   a:	49 89 d7             	mov    %rdx,%r15
   d:	48 89 75 d0          	mov    %rsi,-0x30(%rbp)
  11:	48 89 fb             	mov    %rdi,%rbx
  14:	49 bc 00 00 00 00 00 	movabs $0xdffffc0000000000,%r12
  1b:	fc ff df
  1e:	e8 46 23 e1 ff       	call   0xffe12369
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 40 88 23 00       	call   0x238879
  39:	4c 8b 33             	mov    (%rbx),%r14
  3c:	48 83 c3 20          	add    $0x20,%rbx

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/23 18:08 android13-5.15-lts 829d9f138569 521b0ce3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 general protection fault in dev_map_enqueue
* Struck through repros no longer work on HEAD.