==================================================================
BUG: KASAN: stack-out-of-bounds in bq_xmit_all+0x102c/0x11d0 kernel/bpf/devmap.c:376
Read of size 4 at addr ffffc900091b7930 by task syz.4.1993/14831
CPU: 1 UID: 0 PID: 14831 Comm: syz.4.1993 Not tainted 6.10.0-next-20240725-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
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+0x102c/0x11d0 kernel/bpf/devmap.c:376
__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
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:preempt_schedule_irq+0xf6/0x1c0 kernel/sched/core.c:6925
Code: 89 f5 49 c1 ed 03 eb 0d 48 f7 03 08 00 00 00 0f 84 8b 00 00 00 bf 01 00 00 00 e8 c5 08 a1 f5 e8 40 a6 d9 f5 fb bf 01 00 00 00 55 ad ff ff 43 80 7c 3d 00 00 74 08 4c 89 f7 e8 25 7a 39 f6 48
RSP: 0018:ffffc900091b7680 EFLAGS: 00000282
RAX: 089a19c923b02800 RBX: 1ffff92001236ed8 RCX: ffffffff817022aa
RDX: dffffc0000000000 RSI: ffffffff8c0ad540 RDI: 0000000000000001
RBP: ffffc900091b7740 R08: ffffffff93735807 R09: 1ffffffff26e6b00
R10: dffffc0000000000 R11: fffffbfff26e6b01 R12: 1ffff92001236ed0
R13: 1ffff92001236ed4 R14: ffffc900091b76a0 R15: dffffc0000000000
irqentry_exit+0x5e/0x90 kernel/entry/common.c:354
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 83 1c 20 00 e8 8e a7 45 0a 4d 85 f6 74 c0 e8 74 1c 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 e5 a0 87 00 4c 8b
RSP: 0018:ffffc900091b7800 EFLAGS: 00000246
RAX: ffffffff8173aeac RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9000cf0e000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffc900091b7990 R08: ffffffff8173ae53 R09: 1ffffffff26e6b00
R10: dffffc0000000000 R11: fffffbfff26e6b01 R12: ffffffff8f1328e0
R13: dffffc0000000000 R14: 0000000000000200 R15: 1ffffffff1e26527
console_unlock+0x13b/0x4d0 kernel/printk/printk.c:3173
con_font_set drivers/tty/vt/vt.c:4807 [inline]
con_font_op+0xe05/0x1300 drivers/tty/vt/vt.c:4851
vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline]
vt_ioctl+0x1ccc/0x2090 drivers/tty/vt/vt_ioctl.c:751
tty_ioctl+0x915/0xdc0 drivers/tty/tty_io.c:2837
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
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:0x7fb763775f19
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb7645ca048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fb763905f60 RCX: 00007fb763775f19
RDX: 0000000020000100 RSI: 0000000000004b72 RDI: 000000000000000c
RBP: 00007fb7637e4e68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fb763905f60 R15: 00007ffc9aba9688
The buggy address belongs to stack of task syz.4.1993/14831
and is located at offset 144 in frame:
console_flush_all+0x0/0xf50
This frame has 3 objects:
[32, 40) 'flags.i.i.i101.i'
[64, 72) 'flags.i.i.i.i'
[96, 128) 'pmsg.i'
The buggy address belongs to the virtual mapping at
[ffffc900091b0000, ffffc900091b9000) created by:
copy_process+0x5d1/0x3d90 kernel/fork.c:2206
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88806117c000 pfn:0x6117c
memcg:ffff88801c72ef02
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff88806117c000 0000000000000000 00000001ffffffff ffff88801c72ef02
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 14828, tgid 14828 (syz.4.1993), ts 858849974640, free_ts 858687136660
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:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263
vm_area_alloc_pages mm/vmalloc.c:3584 [inline]
__vmalloc_area_node mm/vmalloc.c:3660 [inline]
__vmalloc_node_range_noprof+0x971/0x1460 mm/vmalloc.c:3841
alloc_thread_stack_node kernel/fork.c:314 [inline]
dup_task_struct+0x444/0x8c0 kernel/fork.c:1115
copy_process+0x5d1/0x3d90 kernel/fork.c:2206
kernel_clone+0x226/0x8f0 kernel/fork.c:2788
__do_sys_clone3 kernel/fork.c:3092 [inline]
__se_sys_clone3+0x2cb/0x350 kernel/fork.c:3071
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 5278 tgid 5278 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:2612
vfree+0x186/0x2e0 mm/vmalloc.c:3364
delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3285
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffffc900091b7800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900091b7880: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2
>ffffc900091b7900: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
^
ffffc900091b7980: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
ffffc900091b7a00: 00 f2 f2 f2 00 f2 f2 f2 01 f2 00 f3 f3 f3 f3 f3
==================================================================
----------------
Code disassembly (best guess):
0: 89 f5 mov %esi,%ebp
2: 49 c1 ed 03 shr $0x3,%r13
6: eb 0d jmp 0x15
8: 48 f7 03 08 00 00 00 testq $0x8,(%rbx)
f: 0f 84 8b 00 00 00 je 0xa0
15: bf 01 00 00 00 mov $0x1,%edi
1a: e8 c5 08 a1 f5 call 0xf5a108e4
1f: e8 40 a6 d9 f5 call 0xf5d9a664
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 55 ad ff ff call 0xffffad84 <-- trapping instruction
2f: 43 80 7c 3d 00 00 cmpb $0x0,0x0(%r13,%r15,1)
35: 74 08 je 0x3f
37: 4c 89 f7 mov %r14,%rdi
3a: e8 25 7a 39 f6 call 0xf6397a64
3f: 48 rex.W