* Re: [syzbot] [bpf?] [net?] general protection fault in __xsk_map_flush
[not found] <20240722144935.2611-1-aha310510@gmail.com>
@ 2024-07-22 15:54 ` syzbot
0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2024-07-22 15:54 UTC (permalink / raw)
To: aha310510, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in bpf_net_ctx_get_all_used_flush_lists
BUG: unable to handle page fault for address: ffffe630188daf02
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 1503a067 P4D 1503a067 PUD 0
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 7523 Comm: syz-executor288 Not tainted 6.10.0-syzkaller-11840-g933069701c1b-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:list_empty include/linux/list.h:373 [inline]
RIP: 0010:bpf_net_ctx_get_all_used_flush_lists+0x16b/0x390 include/linux/filter.h:846
Code: e6 08 31 ff e8 f6 c8 29 f8 4c 89 f8 48 83 e0 08 75 07 e8 08 c4 29 f8 eb 56 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 47 0f 91 f8 48 8b 03 48 39 d8 74 2a
RSP: 0000:ffffc90000007a28 EFLAGS: 00010a02
RAX: 1fffea30188daf02 RBX: ffff5180c46d7810 RCX: dffffc0000000000
RDX: 0000000080000100 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffffff8ddf3a40 R08: ffffffff8969be0a R09: 1ffffffff1f5f50d
R10: dffffc0000000000 R11: fffffbfff1f5f50e R12: 1ffff92000000f5c
R13: ffffc9000b2d77c0 R14: ffffc90000007ae0 R15: 000000000165af0c
FS: 0000555589e57380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe630188daf02 CR3: 000000007d0c8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
xdp_do_check_flushed+0x130/0x2f0 net/core/filter.c:4298
__napi_poll+0xe4/0x490 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
common_interrupt+0xaa/0xd0 arch/x86/kernel/irq.c:278
</IRQ>
<TASK>
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:lock_acquire+0x264/0x550 kernel/locking/lockdep.c:5763
Code: 2b 00 74 08 4c 89 f7 e8 ba 1f 8b 00 f6 44 24 61 02 0f 85 85 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0000:ffffc9000b2d7620 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff9200165aed0 RCX: 697b9cec6cfc8500
RDX: dffffc0000000000 RSI: ffffffff8bcae720 RDI: ffffffff8c20a480
RBP: ffffc9000b2d7778 R08: ffffffff930028af R09: 1ffffffff2600515
R10: dffffc0000000000 R11: fffffbfff2600516 R12: 1ffff9200165aecc
R13: dffffc0000000000 R14: ffffc9000b2d7680 R15: 0000000000000246
percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
__sb_start_write include/linux/fs.h:1675 [inline]
sb_start_write+0x4d/0x1c0 include/linux/fs.h:1811
mnt_want_write+0x3f/0x90 fs/namespace.c:515
do_unlinkat+0x1fe/0x830 fs/namei.c:4469
do_coredump+0x2247/0x2a30 fs/coredump.c:678
get_signal+0x13fa/0x1740 kernel/signal.c:2902
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
irqentry_exit_to_user_mode+0x79/0x280 kernel/entry/common.c:231
exc_page_fault+0x590/0x8c0 arch/x86/mm/fault.c:1542
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7fdae0dfb15e
Code: fd d7 c9 0f bc d1 c5 fe 7f 27 c5 fe 7f 6f 20 c5 fe 7f 77 40 c5 fe 7f 7f 60 49 83 c0 1f 49 29 d0 48 8d 7c 17 61 e9 d2 04 00 00 <c5> fe 6f 1e c5 fe 6f 56 20 c5 fd 74 cb c5 fd d7 d1 49 83 f8 21 0f
RSP: 002b:00007ffcbd96f8c8 EFLAGS: 00010287
RAX: 00007ffcbd96f8e0 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000003ff RSI: 0000000000000000 RDI: 00007ffcbd96f8e0
RBP: 00007ffcbd96f8e0 R08: 00000000000003ff R09: 00007ffcbd96fe28
R10: 00007ffcbd96fe28 R11: 0000000000000246 R12: 6666666666666667
R13: 0000000000000000 R14: 00007ffcbd96fd30 R15: 00007ffcbd96fd20
</TASK>
Modules linked in:
CR2: ffffe630188daf02
---[ end trace 0000000000000000 ]---
RIP: 0010:list_empty include/linux/list.h:373 [inline]
RIP: 0010:bpf_net_ctx_get_all_used_flush_lists+0x16b/0x390 include/linux/filter.h:846
Code: e6 08 31 ff e8 f6 c8 29 f8 4c 89 f8 48 83 e0 08 75 07 e8 08 c4 29 f8 eb 56 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 47 0f 91 f8 48 8b 03 48 39 d8 74 2a
RSP: 0000:ffffc90000007a28 EFLAGS: 00010a02
RAX: 1fffea30188daf02 RBX: ffff5180c46d7810 RCX: dffffc0000000000
RDX: 0000000080000100 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffffff8ddf3a40 R08: ffffffff8969be0a R09: 1ffffffff1f5f50d
R10: dffffc0000000000 R11: fffffbfff1f5f50e R12: 1ffff92000000f5c
R13: ffffc9000b2d77c0 R14: ffffc90000007ae0 R15: 000000000165af0c
FS: 0000555589e57380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe630188daf02 CR3: 000000007d0c8000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: e6 08 out %al,$0x8
2: 31 ff xor %edi,%edi
4: e8 f6 c8 29 f8 call 0xf829c8ff
9: 4c 89 f8 mov %r15,%rax
c: 48 83 e0 08 and $0x8,%rax
10: 75 07 jne 0x19
12: e8 08 c4 29 f8 call 0xf829c41f
17: eb 56 jmp 0x6f
19: 48 89 d8 mov %rbx,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 48 89 df mov %rbx,%rdi
33: e8 47 0f 91 f8 call 0xf8910f7f
38: 48 8b 03 mov (%rbx),%rax
3b: 48 39 d8 cmp %rbx,%rax
3e: 74 2a je 0x6a
Tested on:
commit: 93306970 Merge tag '6.11-rc-smb3-server-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=124846ad980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d04f9888ed34da73
dashboard link: https://syzkaller.appspot.com/bug?extid=61a1cfc2b6632363d319
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=12158b79980000
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20240722161240.4116-1-aha310510@gmail.com>]
* Re: [syzbot] [bpf?] [net?] general protection fault in __xsk_map_flush
[not found] <20240722161240.4116-1-aha310510@gmail.com>
@ 2024-07-22 16:46 ` syzbot
0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2024-07-22 16:46 UTC (permalink / raw)
To: aha310510, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: slab-out-of-bounds Read in bq_xmit_all
==================================================================
BUG: KASAN: slab-out-of-bounds in bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385
Read of size 8 at addr ffff88807a2f03a0 by task syz.0.305/6537
CPU: 0 UID: 0 PID: 6537 Comm: syz.0.305 Not tainted 6.10.0-syzkaller-11840-g933069701c1b-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385
__dev_flush+0x81/0x160 kernel/bpf/devmap.c:425
xdp_do_check_flushed+0x129/0x240 net/core/filter.c:4300
__napi_poll+0xe4/0x490 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
common_interrupt+0xaa/0xd0 arch/x86/kernel/irq.c:278
</IRQ>
<TASK>
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:__sanitizer_cov_trace_switch+0x110/0x120 kernel/kcov.c:342
Code: 43 28 4c 39 f8 77 a3 49 ff c4 4c 89 21 4c 89 44 0b 08 4c 89 74 0b 10 48 89 7c 0b 18 4c 89 4c 0b 20 eb 87 5b 41 5c 41 5e 41 5f <c3> cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90
RSP: 0018:ffffc90002de6ec0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffff88801cb4da00
RDX: 0000000000000003 RSI: ffffffff8e1a32f0 RDI: 0000000000000002
RBP: ffffffff9033a231 R08: 0000000000000005 R09: ffffffff81411746
R10: 0000000000000003 R11: ffff88801cb4da00 R12: ffffffff9033a230
R13: dffffc0000000000 R14: ffffc90002de6ff0 R15: 1ffff920005bcdf4
unwind_next_frame+0xff6/0x2a00 arch/x86/kernel/unwind_orc.c:581
arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122
save_stack+0xfb/0x1f0 mm/page_owner.c:156
__reset_page_owner+0x75/0x3f0 mm/page_owner.c:297
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1094 [inline]
free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2656
folios_put_refs+0x76e/0x860 mm/swap.c:1039
free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:366 [inline]
tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373
tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465
exit_mmap+0x44f/0xc80 mm/mmap.c:3395
__mmput+0x115/0x390 kernel/fork.c:1345
exit_mm+0x220/0x310 kernel/exit.c:571
do_exit+0x9b2/0x27f0 kernel/exit.c:869
do_group_exit+0x207/0x2c0 kernel/exit.c:1031
get_signal+0x16a1/0x1740 kernel/signal.c:2917
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7faf1cf75bd9
Code: Unable to access opcode bytes at 0x7faf1cf75baf.
RSP: 002b:00007faf1dd780f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007faf1d103f68 RCX: 00007faf1cf75bd9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007faf1d103f68
RBP: 00007faf1d103f60 R08: 00007faf1dd786c0 R09: 00007faf1dd786c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007faf1d103f6c
R13: 000000000000000b R14: 00007fff7453a500 R15: 00007fff7453a5e8
</TASK>
Allocated by task 5658:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3988 [inline]
slab_alloc_node mm/slub.c:4037 [inline]
kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4044
vm_area_dup+0x27/0x290 kernel/fork.c:486
dup_mmap kernel/fork.c:695 [inline]
dup_mm kernel/fork.c:1672 [inline]
copy_mm+0xc7b/0x1f30 kernel/fork.c:1721
copy_process+0x187a/0x3dc0 kernel/fork.c:2374
kernel_clone+0x226/0x8f0 kernel/fork.c:2781
__do_sys_clone kernel/fork.c:2924 [inline]
__se_sys_clone kernel/fork.c:2908 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2908
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
The buggy address belongs to the object at ffff88807a2f02e8
which belongs to the cache vm_area_struct of size 184
The buggy address is located 0 bytes to the right of
allocated 184-byte region [ffff88807a2f02e8, ffff88807a2f03a0)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a2f0
memcg:ffff88802c3dca01
anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 00fff00000000000 ffff888015eefb40 ffffea0001e7a400 0000000000000009
raw: 0000000000000000 0000000000100010 00000001fdffffff ffff88802c3dca01
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5933, tgid 5933 (dhcpcd-run-hook), ts 112186336296, free_ts 112182429345
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3438
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x5f/0x120 mm/slub.c:2321
allocate_slab+0x5a/0x2f0 mm/slub.c:2484
new_slab mm/slub.c:2537 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723
__slab_alloc+0x58/0xa0 mm/slub.c:3813
__slab_alloc_node mm/slub.c:3866 [inline]
slab_alloc_node mm/slub.c:4025 [inline]
kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4044
vm_area_dup+0x27/0x290 kernel/fork.c:486
dup_mmap kernel/fork.c:695 [inline]
dup_mm kernel/fork.c:1672 [inline]
copy_mm+0xc7b/0x1f30 kernel/fork.c:1721
copy_process+0x187a/0x3dc0 kernel/fork.c:2374
kernel_clone+0x226/0x8f0 kernel/fork.c:2781
__do_sys_clone kernel/fork.c:2924 [inline]
__se_sys_clone kernel/fork.c:2908 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2908
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
page last free pid 5935 tgid 5935 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1094 [inline]
free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2656
folios_put_refs+0x76e/0x860 mm/swap.c:1039
free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:366 [inline]
tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373
tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465
exit_mmap+0x44f/0xc80 mm/mmap.c:3395
__mmput+0x115/0x390 kernel/fork.c:1345
exit_mm+0x220/0x310 kernel/exit.c:571
do_exit+0x9b2/0x27f0 kernel/exit.c:869
do_group_exit+0x207/0x2c0 kernel/exit.c:1031
__do_sys_exit_group kernel/exit.c:1042 [inline]
__se_sys_exit_group kernel/exit.c:1040 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040
x64_sys_call+0x26c3/0x26d0 arch/x86/include/generated/asm/syscalls_64.h:232
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
Memory state around the buggy address:
ffff88807a2f0280: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00
ffff88807a2f0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807a2f0380: 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00
^
ffff88807a2f0400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807a2f0480: 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 43 28 4c 39 f8 sub %cl,-0x8(%r9,%r15,1)
5: 77 a3 ja 0xffffffaa
7: 49 ff c4 inc %r12
a: 4c 89 21 mov %r12,(%rcx)
d: 4c 89 44 0b 08 mov %r8,0x8(%rbx,%rcx,1)
12: 4c 89 74 0b 10 mov %r14,0x10(%rbx,%rcx,1)
17: 48 89 7c 0b 18 mov %rdi,0x18(%rbx,%rcx,1)
1c: 4c 89 4c 0b 20 mov %r9,0x20(%rbx,%rcx,1)
21: eb 87 jmp 0xffffffaa
23: 5b pop %rbx
24: 41 5c pop %r12
26: 41 5e pop %r14
28: 41 5f pop %r15
* 2a: c3 ret <-- trapping instruction
2b: cc int3
2c: cc int3
2d: cc int3
2e: cc int3
2f: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
36: 00 00 00
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop
Tested on:
commit: 93306970 Merge tag '6.11-rc-smb3-server-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12f902b1980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d04f9888ed34da73
dashboard link: https://syzkaller.appspot.com/bug?extid=61a1cfc2b6632363d319
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=11da7f49980000
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20240722145736.3603-1-aha310510@gmail.com>]
* Re: [syzbot] [bpf?] [net?] general protection fault in __xsk_map_flush
[not found] <20240722145736.3603-1-aha310510@gmail.com>
@ 2024-07-22 16:04 ` syzbot
0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2024-07-22 16:04 UTC (permalink / raw)
To: aha310510, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel paging request in bpf_net_ctx_get_all_used_flush_lists
BUG: unable to handle page fault for address: ffffe63017937f02
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 1503a067 P4D 1503a067 PUD 0
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 6602 Comm: syz.0.303 Not tainted 6.10.0-syzkaller-11840-g933069701c1b-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:list_empty include/linux/list.h:373 [inline]
RIP: 0010:bpf_net_ctx_get_all_used_flush_lists+0x16b/0x390 include/linux/filter.h:846
Code: e6 08 31 ff e8 f6 c8 29 f8 4c 89 f8 48 83 e0 08 75 07 e8 08 c4 29 f8 eb 56 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 47 0f 91 f8 48 8b 03 48 39 d8 74 2a
RSP: 0000:ffffc90000a18a28 EFLAGS: 00010a02
RAX: 1fffea3017937f02 RBX: ffff5180bc9bf810 RCX: dffffc0000000000
RDX: 0000000080000101 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffffff8ddf3a48 R08: ffffffff8969be0a R09: 1ffffffff1f5f50d
R10: dffffc0000000000 R11: fffffbfff1f5f50e R12: 1ffff9200014315c
R13: ffffc900034bf7c0 R14: ffffc90000a18ae0 R15: 0000000000697f0a
FS: 00007fd8f234c6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe63017937f02 CR3: 0000000072ffa000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
xdp_do_check_flushed+0x130/0x2f0 net/core/filter.c:4298
__napi_poll+0xe4/0x490 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:rdtsc_ordered arch/x86/include/asm/msr.h:230 [inline]
RIP: 0010:__pvclock_clocksource_read arch/x86/kernel/pvclock.c:77 [inline]
RIP: 0010:pvclock_clocksource_read_nowd+0x4a/0xf0 arch/x86/kernel/pvclock.c:120
Code: 89 e1 48 d3 e3 4c 89 2c 24 48 89 d8 48 f7 24 24 48 0f ac d0 20 49 8b 4e 10 41 0f b6 56 1d 41 8b 36 39 ee 89 f5 74 5d 0f 01 f9 <66> 90 48 89 d3 48 c1 e3 20 48 09 c3 49 2b 5e 08 83 e5 fe 45 8b 6e
RSP: 0000:ffffc900034bf318 EFLAGS: 00000283
RAX: 0000000068d4b4f6 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000089 RSI: 0000000000000000 RDI: ffffffff929f5040
RBP: 0000000000000004 R08: ffffea00019b5cf7 R09: 0000000000000000
R10: ffffed100cdae600 R11: fffff94000336b9f R12: 0000000000140dca
R13: 0000000000000001 R14: ffffffff929f5040 R15: dffffc0000000000
kvm_sched_clock_read+0x11/0x20 arch/x86/kernel/kvmclock.c:91
local_clock_noinstr+0xe/0xe0 kernel/sched/clock.c:301
local_clock+0x10/0x30 kernel/sched/clock.c:315
__set_page_owner+0x80/0x800 mm/page_owner.c:317
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3438
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263
folio_alloc_mpol_noprof mm/mempolicy.c:2281 [inline]
vma_alloc_folio_noprof+0xf3/0x1f0 mm/mempolicy.c:2309
folio_prealloc+0x31/0x170
alloc_anon_folio mm/memory.c:4498 [inline]
do_anonymous_page mm/memory.c:4555 [inline]
do_pte_missing mm/memory.c:3945 [inline]
handle_pte_fault+0x252d/0x6eb0 mm/memory.c:5522
__handle_mm_fault mm/memory.c:5665 [inline]
handle_mm_fault+0x1021/0x1990 mm/memory.c:5830
do_user_addr_fault arch/x86/mm/fault.c:1338 [inline]
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7fd8f1447716
Code: 13 ff ff 48 c7 c0 ff ff ff ff eb b0 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55 53 48 81 ec 40 20 00 00 48 8b 05 6a fd 1a 00 <48> 89 7c 24 18 48 89 74 24 10 be 02 55 08 80 48 89 54 24 08 48 8b
RSP: 002b:00007fd8f2349fd0 EFLAGS: 00010202
RAX: 0000100000000000 RBX: 00007fd8f1703f60 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffffffffff
RBP: 00007fd8f15e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000000 R12: 0000000000000000
R13: 000000000000000b R14: 00007fd8f1703f60 R15: 00007ffd1bc275c8
</TASK>
Modules linked in:
CR2: ffffe63017937f02
---[ end trace 0000000000000000 ]---
RIP: 0010:list_empty include/linux/list.h:373 [inline]
RIP: 0010:bpf_net_ctx_get_all_used_flush_lists+0x16b/0x390 include/linux/filter.h:846
Code: e6 08 31 ff e8 f6 c8 29 f8 4c 89 f8 48 83 e0 08 75 07 e8 08 c4 29 f8 eb 56 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 47 0f 91 f8 48 8b 03 48 39 d8 74 2a
RSP: 0000:ffffc90000a18a28 EFLAGS: 00010a02
RAX: 1fffea3017937f02 RBX: ffff5180bc9bf810 RCX: dffffc0000000000
RDX: 0000000080000101 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffffff8ddf3a48 R08: ffffffff8969be0a R09: 1ffffffff1f5f50d
R10: dffffc0000000000 R11: fffffbfff1f5f50e R12: 1ffff9200014315c
R13: ffffc900034bf7c0 R14: ffffc90000a18ae0 R15: 0000000000697f0a
FS: 00007fd8f234c6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe63017937f02 CR3: 0000000072ffa000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: e6 08 out %al,$0x8
2: 31 ff xor %edi,%edi
4: e8 f6 c8 29 f8 call 0xf829c8ff
9: 4c 89 f8 mov %r15,%rax
c: 48 83 e0 08 and $0x8,%rax
10: 75 07 jne 0x19
12: e8 08 c4 29 f8 call 0xf829c41f
17: eb 56 jmp 0x6f
19: 48 89 d8 mov %rbx,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 48 89 df mov %rbx,%rdi
33: e8 47 0f 91 f8 call 0xf8910f7f
38: 48 8b 03 mov (%rbx),%rax
3b: 48 39 d8 cmp %rbx,%rax
3e: 74 2a je 0x6a
Tested on:
commit: 93306970 Merge tag '6.11-rc-smb3-server-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11b58b79980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d04f9888ed34da73
dashboard link: https://syzkaller.appspot.com/bug?extid=61a1cfc2b6632363d319
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=145810a1980000
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20240722125338.6315-1-aha310510@gmail.com>]
* Re: [syzbot] [bpf?] [net?] general protection fault in __xsk_map_flush
[not found] <20240722125338.6315-1-aha310510@gmail.com>
@ 2024-07-22 14:32 ` syzbot
0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2024-07-22 14:32 UTC (permalink / raw)
To: aha310510, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KASAN: slab-out-of-bounds Read in bq_xmit_all
==================================================================
BUG: KASAN: slab-out-of-bounds in bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385
Read of size 8 at addr ffff88807a1c2d50 by task syz.0.283/6567
CPU: 0 UID: 0 PID: 6567 Comm: syz.0.283 Not tainted 6.10.0-syzkaller-11840-g933069701c1b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385
__dev_flush+0x81/0x160 kernel/bpf/devmap.c:425
xdp_do_check_flushed+0x129/0x240 net/core/filter.c:4300
__napi_poll+0xe4/0x490 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__sanitizer_cov_trace_pc+0x5d/0x70 kernel/kcov.c:225
Code: f8 15 00 00 83 fa 02 75 21 48 8b 91 00 16 00 00 48 8b 32 48 8d 7e 01 8b 89 fc 15 00 00 48 39 cf 73 08 48 89 3a 48 89 44 f2 08 <c3> cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90
RSP: 0018:ffffc90003ddf398 EFLAGS: 00000293
RAX: ffffffff81d0022b RBX: dffffc0000000000 RCX: ffff888026fe8000
RDX: 0000000000000000 RSI: 000000000000000f RDI: 000000000000001f
RBP: ffffc90003ddf4b0 R08: ffffffff81d001ee R09: 1ffffd40003c2f6e
R10: dffffc0000000000 R11: fffff940003c2f6f R12: ffffc90003ddf5a0
R13: ffffea0001e17b80 R14: ffffc90003ddf520 R15: 000000000000000f
folios_put_refs+0x19b/0x860 mm/swap.c:994
free_pages_and_swap_cache+0x2ea/0x690 mm/swap_state.c:332
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:366 [inline]
tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373
tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465
exit_mmap+0x44f/0xc80 mm/mmap.c:3395
__mmput+0x115/0x390 kernel/fork.c:1345
exit_mm+0x220/0x310 kernel/exit.c:571
do_exit+0x9b2/0x27f0 kernel/exit.c:869
do_group_exit+0x207/0x2c0 kernel/exit.c:1031
get_signal+0x16a1/0x1740 kernel/signal.c:2917
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1635175bd9
Code: Unable to access opcode bytes at 0x7f1635175baf.
RSP: 002b:00007f1635e770f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f1635303f68 RCX: 00007f1635175bd9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f1635303f68
RBP: 00007f1635303f60 R08: 00007f1635e776c0 R09: 00007f1635e776c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1635303f6c
R13: 000000000000000b R14: 00007ffeb68d9450 R15: 00007ffeb68d9538
</TASK>
Allocated by task 5754:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3988 [inline]
slab_alloc_node mm/slub.c:4037 [inline]
kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4044
vm_area_dup+0x27/0x290 kernel/fork.c:486
dup_mmap kernel/fork.c:695 [inline]
dup_mm kernel/fork.c:1672 [inline]
copy_mm+0xc7b/0x1f30 kernel/fork.c:1721
copy_process+0x187a/0x3dc0 kernel/fork.c:2374
kernel_clone+0x226/0x8f0 kernel/fork.c:2781
__do_sys_clone kernel/fork.c:2924 [inline]
__se_sys_clone kernel/fork.c:2908 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2908
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
The buggy address belongs to the object at ffff88807a1c2c98
which belongs to the cache vm_area_struct of size 184
The buggy address is located 0 bytes to the right of
allocated 184-byte region [ffff88807a1c2c98, ffff88807a1c2d50)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a1c2
memcg:ffff8880227b2101
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 00fff00000000000 ffff888015eefb40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000001fdffffff ffff8880227b2101
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5972, tgid 5972 (dhcpcd-run-hook), ts 122017798005, free_ts 121858197708
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3438
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x5f/0x120 mm/slub.c:2321
allocate_slab+0x5a/0x2f0 mm/slub.c:2484
new_slab mm/slub.c:2537 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723
__slab_alloc+0x58/0xa0 mm/slub.c:3813
__slab_alloc_node mm/slub.c:3866 [inline]
slab_alloc_node mm/slub.c:4025 [inline]
kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4044
vm_area_dup+0x27/0x290 kernel/fork.c:486
dup_mmap kernel/fork.c:695 [inline]
dup_mm kernel/fork.c:1672 [inline]
copy_mm+0xc7b/0x1f30 kernel/fork.c:1721
copy_process+0x187a/0x3dc0 kernel/fork.c:2374
kernel_clone+0x226/0x8f0 kernel/fork.c:2781
__do_sys_clone kernel/fork.c:2924 [inline]
__se_sys_clone kernel/fork.c:2908 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2908
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
page last free pid 5966 tgid 5966 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1094 [inline]
free_unref_page+0xd22/0xea0 mm/page_alloc.c:2608
discard_slab mm/slub.c:2583 [inline]
__put_partials+0xeb/0x130 mm/slub.c:3051
put_cpu_partial+0x17c/0x250 mm/slub.c:3126
__slab_free+0x2ea/0x3d0 mm/slub.c:4343
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3988 [inline]
slab_alloc_node mm/slub.c:4037 [inline]
__do_kmalloc_node mm/slub.c:4157 [inline]
__kmalloc_noprof+0x1a6/0x400 mm/slub.c:4170
kmalloc_noprof include/linux/slab.h:685 [inline]
tomoyo_realpath_from_path+0xcf/0x5e0 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x2b7/0x740 security/tomoyo/file.c:822
security_inode_getattr+0xd8/0x130 security/security.c:2269
vfs_getattr+0x45/0x430 fs/stat.c:204
vfs_fstat fs/stat.c:229 [inline]
vfs_fstatat+0xe4/0x190 fs/stat.c:338
__do_sys_newfstatat fs/stat.c:505 [inline]
__se_sys_newfstatat fs/stat.c:499 [inline]
__x64_sys_newfstatat+0x11d/0x1a0 fs/stat.c:499
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
Memory state around the buggy address:
ffff88807a1c2c00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
ffff88807a1c2c80: fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807a1c2d00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
^
ffff88807a1c2d80: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807a1c2e00: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: f8 clc
1: 15 00 00 83 fa adc $0xfa830000,%eax
6: 02 75 21 add 0x21(%rbp),%dh
9: 48 8b 91 00 16 00 00 mov 0x1600(%rcx),%rdx
10: 48 8b 32 mov (%rdx),%rsi
13: 48 8d 7e 01 lea 0x1(%rsi),%rdi
17: 8b 89 fc 15 00 00 mov 0x15fc(%rcx),%ecx
1d: 48 39 cf cmp %rcx,%rdi
20: 73 08 jae 0x2a
22: 48 89 3a mov %rdi,(%rdx)
25: 48 89 44 f2 08 mov %rax,0x8(%rdx,%rsi,8)
* 2a: c3 ret <-- trapping instruction
2b: cc int3
2c: cc int3
2d: cc int3
2e: cc int3
2f: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
36: 00 00 00
39: 0f 1f 40 00 nopl 0x0(%rax)
3d: 90 nop
3e: 90 nop
3f: 90 nop
Tested on:
commit: 93306970 Merge tag '6.11-rc-smb3-server-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=130810c9980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d04f9888ed34da73
dashboard link: https://syzkaller.appspot.com/bug?extid=61a1cfc2b6632363d319
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [syzbot] [bpf?] [net?] general protection fault in __xsk_map_flush
@ 2024-07-16 1:23 syzbot
0 siblings, 0 replies; 5+ messages in thread
From: syzbot @ 2024-07-16 1:23 UTC (permalink / raw)
To: andrii, ast, bigeasy, bjorn, bpf, daniel, davem, eddyz87,
edumazet, haoluo, hawk, jasowang, jiri, john.fastabend, jolsa,
jonathan.lemon, kpsingh, kuba, linux-kernel, maciej.fijalkowski,
magnus.karlsson, martin.lau, netdev, pabeni, sdf, song,
syzkaller-bugs, willemdebruijn.kernel, yonghong.song
Hello,
syzbot found the following issue on:
HEAD commit: 3fe121b62282 Add linux-next specific files for 20240712
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16085221980000
kernel config: https://syzkaller.appspot.com/x/.config?x=98dd8c4bab5cdce
dashboard link: https://syzkaller.appspot.com/bug?extid=61a1cfc2b6632363d319
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a2a5e1980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12dd6479980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8c6fbf69718d/disk-3fe121b6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/39fc7e43dfc1/vmlinux-3fe121b6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0a78e70e4b4e/bzImage-3fe121b6.xz
The issue was bisected to:
commit fecef4cd42c689a200bdd39e6fffa71475904bc1
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu Jul 4 14:48:15 2024 +0000
tun: Assign missing bpf_net_context.
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=119d4b6e980000
final oops: https://syzkaller.appspot.com/x/report.txt?x=139d4b6e980000
console output: https://syzkaller.appspot.com/x/log.txt?x=159d4b6e980000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+61a1cfc2b6632363d319@syzkaller.appspotmail.com
Fixes: fecef4cd42c6 ("tun: Assign missing bpf_net_context.")
Oops: general protection fault, probably for non-canonical address 0xe000140493916901: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: maybe wild-memory-access in range [0x0000c0249c8b4808-0x0000c0249c8b480f]
CPU: 1 UID: 0 PID: 5098 Comm: syz-executor400 Not tainted 6.10.0-rc7-next-20240712-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:xskq_prod_submit net/xdp/xsk_queue.h:436 [inline]
RIP: 0010:xsk_flush net/xdp/xsk.c:331 [inline]
RIP: 0010:__xsk_map_flush+0x95/0x2b0 net/xdp/xsk.c:393
Code: 24 10 49 8d 5f e8 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 d9 ea 81 f6 48 8b 1b 48 8d 7b 08 48 89 f8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 72 01 00 00 8b 6b 08 48 83 c3 10 48 89
RSP: 0018:ffffc90000a18ae8 EFLAGS: 00010202
RAX: 0000180493916901 RBX: 0000c0249c8b4800 RCX: ffff888029608000
RDX: 0000000080000101 RSI: 0000000000000010 RDI: 0000c0249c8b4808
RBP: dffffc0000000000 R08: ffffffff896d0c9a R09: 1ffffffff1f5ffad
R10: dffffc0000000000 R11: fffffbfff1f5ffae R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000010 R15: ffffffff8173aee3
FS: 000055557b0fb380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557b0fbca8 CR3: 000000007eb32000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
xdp_do_check_flushed+0x18e/0x240 net/core/filter.c:4308
__napi_poll+0xe4/0x490 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:console_flush_all+0x9f7/0xf50 kernel/printk/printk.c:3103
Code: 20 00 90 0f 0b 90 e9 f3 f9 ff ff e8 c3 1b 20 00 e8 7e 56 20 0a 4d 85 f6 74 c0 e8 b4 1b 20 00 fb 49 bd 00 00 00 00 00 fc ff df <43> 80 3c 2f 00 48 8b 5c 24 30 74 08 48 89 df e8 d5 a1 87 00 4c 8b
RSP: 0018:ffffc90003527880 EFLAGS: 00000293
RAX: ffffffff8173af3c RBX: 0000000000000000 RCX: ffff888029608000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003527a10 R08: ffffffff8173aee3 R09: 1ffffffff1f5ffad
R10: dffffc0000000000 R11: fffffbfff1f5ffae R12: ffffffff8eb30c00
R13: dffffc0000000000 R14: 0000000000000200 R15: 1ffffffff1d6618b
console_unlock+0x13b/0x4d0 kernel/printk/printk.c:3173
vprintk_emit+0x7a1/0x900 kernel/printk/printk.c:2423
_printk+0xd5/0x120 kernel/printk/printk.c:2450
show_opcodes+0x148/0x170 arch/x86/kernel/dumpstack.c:123
show_signal_msg arch/x86/mm/fault.c:775 [inline]
__bad_area_nosemaphore+0x5f2/0x770 arch/x86/mm/fault.c:818
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x61d/0x8c0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7f9fe69c315e
Code: fd d7 c9 0f bc d1 c5 fe 7f 27 c5 fe 7f 6f 20 c5 fe 7f 77 40 c5 fe 7f 7f 60 49 83 c0 1f 49 29 d0 48 8d 7c 17 61 e9 d2 04 00 00 <c5> fe 6f 1e c5 fe 6f 56 20 c5 fd 74 cb c5 fd d7 d1 49 83 f8 21 0f
RSP: 002b:00007ffce01d48e8 EFLAGS: 00010287
RAX: 00007ffce01d4900 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000003ff RSI: 0000000000000000 RDI: 00007ffce01d4900
RBP: 00007ffce01d4900 R08: 00000000000003ff R09: 00007ffce01d4e48
R10: 00007ffce01d4e48 R11: 0000000000000246 R12: 6666666666666667
R13: 0000000000000000 R14: 00007ffce01d4d50 R15: 00007ffce01d4d40
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:xskq_prod_submit net/xdp/xsk_queue.h:436 [inline]
RIP: 0010:xsk_flush net/xdp/xsk.c:331 [inline]
RIP: 0010:__xsk_map_flush+0x95/0x2b0 net/xdp/xsk.c:393
Code: 24 10 49 8d 5f e8 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 d9 ea 81 f6 48 8b 1b 48 8d 7b 08 48 89 f8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 72 01 00 00 8b 6b 08 48 83 c3 10 48 89
RSP: 0018:ffffc90000a18ae8 EFLAGS: 00010202
RAX: 0000180493916901 RBX: 0000c0249c8b4800 RCX: ffff888029608000
RDX: 0000000080000101 RSI: 0000000000000010 RDI: 0000c0249c8b4808
RBP: dffffc0000000000 R08: ffffffff896d0c9a R09: 1ffffffff1f5ffad
R10: dffffc0000000000 R11: fffffbfff1f5ffae R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000010 R15: ffffffff8173aee3
FS: 000055557b0fb380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557b0fbca8 CR3: 000000007eb32000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 24 10 and $0x10,%al
2: 49 8d 5f e8 lea -0x18(%r15),%rbx
6: 48 89 d8 mov %rbx,%rax
9: 48 c1 e8 03 shr $0x3,%rax
d: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
12: 74 08 je 0x1c
14: 48 89 df mov %rbx,%rdi
17: e8 d9 ea 81 f6 call 0xf681eaf5
1c: 48 8b 1b mov (%rbx),%rbx
1f: 48 8d 7b 08 lea 0x8(%rbx),%rdi
23: 48 89 f8 mov %rdi,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 72 01 00 00 jne 0x1a9
37: 8b 6b 08 mov 0x8(%rbx),%ebp
3a: 48 83 c3 10 add $0x10,%rbx
3e: 48 rex.W
3f: 89 .byte 0x89
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-22 16:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240722144935.2611-1-aha310510@gmail.com>
2024-07-22 15:54 ` [syzbot] [bpf?] [net?] general protection fault in __xsk_map_flush syzbot
[not found] <20240722161240.4116-1-aha310510@gmail.com>
2024-07-22 16:46 ` syzbot
[not found] <20240722145736.3603-1-aha310510@gmail.com>
2024-07-22 16:04 ` syzbot
[not found] <20240722125338.6315-1-aha310510@gmail.com>
2024-07-22 14:32 ` syzbot
2024-07-16 1:23 syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox