================================================================== BUG: KASAN: slab-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:131 [inline] BUG: KASAN: slab-out-of-bounds in trace_page_fault_entries arch/x86/mm/fault.c:1516 [inline] BUG: KASAN: slab-out-of-bounds in do_page_fault+0x6d/0x320 arch/x86/mm/fault.c:1528 Read of size 8 at addr ffff8881c0567f40 by task syz.0.1044/3515 CPU: 1 PID: 3515 Comm: syz.0.1044 Not tainted 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: Allocated by task 3156: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/0x200 mm/kasan/common.c:529 kasan_kmalloc+0xd/0x20 mm/kasan/common.c:543 __kmalloc+0x12a/0x2f0 mm/slub.c:3913 __kmalloc_node include/linux/slab.h:422 [inline] kmalloc_node include/linux/slab.h:599 [inline] kvmalloc_node+0x88/0xf0 mm/util.c:596 kvmalloc include/linux/mm.h:761 [inline] kvmalloc_array include/linux/mm.h:779 [inline] __ptr_ring_init_queue_alloc include/linux/ptr_ring.h:470 [inline] ptr_ring_init include/linux/ptr_ring.h:488 [inline] skb_array_init include/linux/skb_array.h:182 [inline] pfifo_fast_init+0x112/0x7a0 net/sched/sch_generic.c:784 qdisc_create_dflt+0x135/0x270 net/sched/sch_generic.c:944 mq_init+0x2df/0x660 net/sched/sch_mq.c:90 qdisc_create_dflt+0x135/0x270 net/sched/sch_generic.c:944 attach_default_qdiscs net/sched/sch_generic.c:1113 [inline] dev_activate+0x132/0xc80 net/sched/sch_generic.c:1154 __dev_open+0x2d3/0x3f0 net/core/dev.c:1335 __dev_change_flags+0x20a/0x6a0 net/core/dev.c:7958 dev_change_flags+0x88/0x1a0 net/core/dev.c:8029 dev_ifsioc+0x110/0xa40 net/core/dev_ioctl.c:226 dev_ioctl+0x550/0xb80 net/core/dev_ioctl.c:483 sock_do_ioctl+0x235/0x330 net/socket.c:1081 sock_ioctl+0x505/0x710 net/socket.c:1198 do_vfs_ioctl+0x753/0x13f0 fs/ioctl.c:47 ksys_ioctl fs/ioctl.c:742 [inline] __do_sys_ioctl fs/ioctl.c:749 [inline] __se_sys_ioctl fs/ioctl.c:747 [inline] __x64_sys_ioctl+0xe1/0x120 fs/ioctl.c:747 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 3158: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kfree+0xbe/0x260 mm/slub.c:4071 kvfree+0x4c/0x50 mm/util.c:625 ptr_ring_cleanup include/linux/ptr_ring.h:670 [inline] pfifo_fast_destroy+0x4d/0xd0 net/sched/sch_generic.c:810 qdisc_destroy+0xde/0x440 net/sched/sch_generic.c:1008 qdisc_put net/sched/sch_generic.c:1035 [inline] shutdown_scheduler_queue net/sched/sch_generic.c:1372 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2194 [inline] dev_shutdown+0x198/0x580 net/sched/sch_generic.c:1378 rollback_registered_many+0x7af/0xf40 net/core/dev.c:8643 rollback_registered net/core/dev.c:8692 [inline] unregister_netdevice_queue+0x2e1/0x450 net/core/dev.c:9786 unregister_netdevice include/linux/netdevice.h:2732 [inline] __tun_detach+0xb40/0x1340 drivers/net/tun.c:747 tun_detach drivers/net/tun.c:763 [inline] tun_chr_close+0x92/0x140 drivers/net/tun.c:3563 __fput+0x2a3/0x730 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x146/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa43/0x2660 kernel/exit.c:861 __do_sys_exit kernel/exit.c:953 [inline] __se_sys_exit kernel/exit.c:951 [inline] __ia32_sys_exit+0x0/0x40 kernel/exit.c:951 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881c0564000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 8000 bytes to the right of 8192-byte region [ffff8881c0564000, ffff8881c0566000) The buggy address belongs to the page: page:ffffea0007015800 refcount:1 mapcount:0 mapping:ffff8881f5c0c500 index:0xffff8881c0560000 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea0007016208 ffffea0007122808 ffff8881f5c0c500 raw: ffff8881c0560000 0000000000020001 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4894 alloc_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] __kmalloc+0x176/0x2f0 mm/slub.c:3909 kmalloc_array include/linux/slab.h:618 [inline] realloc_stack_state kernel/bpf/verifier.c:595 [inline] realloc_func_state+0x305/0x5b0 kernel/bpf/verifier.c:611 copy_func_state kernel/bpf/verifier.c:704 [inline] copy_verifier_state+0x65f/0xc20 kernel/bpf/verifier.c:751 is_state_visited kernel/bpf/verifier.c:7702 [inline] do_check+0x21c9/0x8a60 kernel/bpf/verifier.c:7837 bpf_check+0x208a/0x9cf0 kernel/bpf/verifier.c:9637 bpf_prog_load+0xa5f/0xe10 kernel/bpf/syscall.c:1724 __do_sys_bpf kernel/bpf/syscall.c:2891 [inline] __se_sys_bpf+0x435/0x570 kernel/bpf/syscall.c:2849 __x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:2849 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x7e4/0x910 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4956 [inline] __free_pages+0x8c/0x110 mm/page_alloc.c:4962 __free_slab+0x218/0x2d0 mm/slub.c:1774 free_slab mm/slub.c:1789 [inline] discard_slab mm/slub.c:1795 [inline] unfreeze_partials+0x165/0x1a0 mm/slub.c:2288 put_cpu_partial+0xc1/0x180 mm/slub.c:2324 __slab_free+0x2be/0x380 mm/slub.c:2971 do_slab_free mm/slub.c:3068 [inline] ___cache_free+0xbb/0xd0 mm/slub.c:3087 qlink_free+0x23/0x30 mm/kasan/quarantine.c:148 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:167 quarantine_reduce+0x1a8/0x200 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x42/0x200 mm/kasan/common.c:507 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 getname_flags+0xb9/0x500 fs/namei.c:141 getname fs/namei.c:212 [inline] __do_sys_unlink fs/namei.c:4259 [inline] __se_sys_unlink fs/namei.c:4257 [inline] __x64_sys_unlink+0x3c/0x50 fs/namei.c:4257 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 Memory state around the buggy address: ffff8881c0567e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881c0567e80: fc fc fc fc 00 00 00 00 00 00 00 00 fc fc fc fc >ffff8881c0567f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881c0567f80: fc fc fc fc f1 f1 f1 f1 00 f2 f2 f2 04 f3 f3 f3 ffff8881c0568000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================