==================================================================
BUG: KASAN: stack-out-of-bounds in list_empty include/linux/list.h:373 [inline]
BUG: KASAN: stack-out-of-bounds in bpf_net_ctx_get_all_used_flush_lists include/linux/filter.h:846 [inline]
BUG: KASAN: stack-out-of-bounds in xdp_do_check_flushed+0x429/0x4e0 net/core/filter.c:4298
Read of size 8 at addr ffffc90003157a68 by task syz-executor726/5705
CPU: 0 PID: 5705 Comm: syz-executor726 Not tainted 6.10.0-syzkaller-11185-g2c9b3512402e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
list_empty include/linux/list.h:373 [inline]
bpf_net_ctx_get_all_used_flush_lists include/linux/filter.h:846 [inline]
xdp_do_check_flushed+0x429/0x4e0 net/core/filter.c:4298
__napi_poll.constprop.0+0xd1/0x550 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6962
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:278
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:finish_task_switch.isra.0+0x220/0xcc0 kernel/sched/core.c:5062
Code: a9 0a 00 00 44 8b 0d 67 b8 8c 0e 45 85 c9 0f 85 c0 01 00 00 48 89 df e8 ae f8 ff ff e8 d9 ce 36 00 fb 65 48 8b 1d d0 0d a9 7e <48> 8d bb f8 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc90003157968 EFLAGS: 00000206
RAX: 0000000000000309 RBX: ffff88802b04bc00 RCX: 1ffffffff285ad2d
RDX: 0000000000000000 RSI: ffffffff8b2cbac0 RDI: ffffffff8b909200
RBP: ffffc900031579b0 R08: 0000000000000001 R09: fffffbfff2859c82
R10: ffffffff942ce417 R11: 0000000000000000 R12: ffff8880b923fa18
R13: ffff888017693c00 R14: ffff88807c191300 R15: ffff8880b923ec80
context_switch kernel/sched/core.c:5191 [inline]
__schedule+0xe3f/0x5490 kernel/sched/core.c:6529
preempt_schedule_common+0x44/0xc0 kernel/sched/core.c:6708
preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0x61/0x80 kernel/locking/spinlock.c:194
kthread_queue_work+0xa8/0x170 kernel/kthread.c:1025
synchronize_rcu_expedited_queue_work kernel/rcu/tree_exp.h:488 [inline]
synchronize_rcu_expedited+0x2f6/0x450 kernel/rcu/tree_exp.h:968
synchronize_net+0x4e/0x60 net/core/dev.c:11225
packet_release+0xb30/0xdd0 net/packet/af_packet.c:3231
__sock_release+0xb0/0x270 net/socket.c:659
sock_close+0x1c/0x30 net/socket.c:1421
__fput+0x408/0xbb0 fs/file_table.c:422
__fput_sync+0x47/0x50 fs/file_table.c:507
__do_sys_close fs/open.c:1566 [inline]
__se_sys_close fs/open.c:1551 [inline]
__x64_sys_close+0x86/0x100 fs/open.c:1551
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff0b7e12e60
Code: ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 80 3d 41 e2 07 00 00 74 17 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c
RSP: 002b:00007fffe28bfef8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007ff0b7e12e60
RDX: 0000000000000e80 RSI: 0000000020000400 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00007fffe28c0028 R09: 00007fffe28c0028
R10: 00007fffe28c0028 R11: 0000000000000202 R12: 0000000000000000
R13: 00007fffe28bff14 R14: 00007fffe28bff30 R15: 00007fffe28bff20
The buggy address belongs to stack of task syz-executor726/5705
and is located at offset 0 in frame:
__schedule+0x0/0x5490
This frame has 3 objects:
[48, 52) 'cid'
[64, 80) 'rf'
[96, 120) 'ac'
The buggy address belongs to the virtual mapping at
[ffffc90003150000, ffffc90003159000) created by:
kernel_clone+0xfd/0x980 kernel/fork.c:2780
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c21f
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 5088, tgid 5088 (syz-executor726), ts 82164216760, free_ts 81714521277
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2265
vm_area_alloc_pages mm/vmalloc.c:3583 [inline]
__vmalloc_area_node mm/vmalloc.c:3659 [inline]
__vmalloc_node_range_noprof+0xa6a/0x1520 mm/vmalloc.c:3840
alloc_thread_stack_node kernel/fork.c:311 [inline]
dup_task_struct kernel/fork.c:1111 [inline]
copy_process+0x2f3b/0x8de0 kernel/fork.c:2203
kernel_clone+0xfd/0x980 kernel/fork.c:2780
__do_sys_clone+0xba/0x100 kernel/fork.c:2923
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5665 tgid 5665 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_folios+0x991/0x1310 mm/page_alloc.c:2637
folios_put_refs+0x487/0x6d0 mm/swap.c:1024
free_pages_and_swap_cache+0x45f/0x510 mm/swap_state.c:332
__tlb_batch_free_encoded_pages+0xf9/0x290 mm/mmu_gather.c:136
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:366 [inline]
tlb_flush_mmu mm/mmu_gather.c:373 [inline]
tlb_finish_mmu+0x168/0x7b0 mm/mmu_gather.c:465
exit_mmap+0x3d1/0xb20 mm/mmap.c:3354
__mmput+0x12a/0x480 kernel/fork.c:1343
mmput+0x62/0x70 kernel/fork.c:1365
exit_mm kernel/exit.c:566 [inline]
do_exit+0x9bf/0x2bb0 kernel/exit.c:864
do_group_exit+0xd3/0x2a0 kernel/exit.c:1026
__do_sys_exit_group kernel/exit.c:1037 [inline]
__se_sys_exit_group kernel/exit.c:1035 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1035
x64_sys_call+0x14a9/0x16a0 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffffc90003157900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003157980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90003157a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
^
ffffc90003157a80: f1 f1 f1 04 f2 00 00 f2 f2 00 00 00 f3 f3 f3 f3
ffffc90003157b00: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: a9 0a 00 00 44 test $0x4400000a,%eax
5: 8b 0d 67 b8 8c 0e mov 0xe8cb867(%rip),%ecx # 0xe8cb872
b: 45 85 c9 test %r9d,%r9d
e: 0f 85 c0 01 00 00 jne 0x1d4
14: 48 89 df mov %rbx,%rdi
17: e8 ae f8 ff ff call 0xfffff8ca
1c: e8 d9 ce 36 00 call 0x36cefa
21: fb sti
22: 65 48 8b 1d d0 0d a9 mov %gs:0x7ea90dd0(%rip),%rbx # 0x7ea90dfa
29: 7e
* 2a: 48 8d bb f8 15 00 00 lea 0x15f8(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1