================================================================== BUG: KASAN: slab-out-of-bounds in __write_once_size include/linux/compiler.h:295 [inline] BUG: KASAN: slab-out-of-bounds in __hlist_del include/linux/list.h:789 [inline] BUG: KASAN: slab-out-of-bounds in detach_timer kernel/time/timer.c:824 [inline] BUG: KASAN: slab-out-of-bounds in detach_if_pending+0x12d/0x330 kernel/time/timer.c:841 Write of size 8 at addr ffff8881d89cf1c0 by task syz-executor/1634 CPU: 1 PID: 1634 Comm: syz-executor 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: __dump_stack+0x1e/0x20 lib/dump_stack.c:77 dump_stack+0x15b/0x1b8 lib/dump_stack.c:118 print_address_description+0x8d/0x4c0 mm/kasan/report.c:384 __kasan_report+0xef/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:137 __write_once_size include/linux/compiler.h:295 [inline] __hlist_del include/linux/list.h:789 [inline] detach_timer kernel/time/timer.c:824 [inline] detach_if_pending+0x12d/0x330 kernel/time/timer.c:841 try_to_del_timer_sync kernel/time/timer.c:1267 [inline] del_timer_sync+0x136/0x1a0 kernel/time/timer.c:1410 tun_flow_uninit+0x2f/0x2b0 drivers/net/tun.c:1452 tun_free_netdev+0x7a/0x1b0 drivers/net/tun.c:2404 netdev_run_todo+0xa45/0xc70 net/core/dev.c:9477 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:112 tun_detach drivers/net/tun.c:766 [inline] tun_chr_close+0xc4/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_group_exit+0x13e/0x300 kernel/exit.c:984 __do_sys_exit_group kernel/exit.c:995 [inline] __se_sys_exit_group kernel/exit.c:993 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:993 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f2bbf726969 Code: Bad RIP value. RSP: 002b:00007ffddb3b8098 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2bbf726969 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000043 RBP: 00007f2bbf7868f0 R08: 00007ffddb3b5e37 R09: 0000000000000003 R10: 0000000000000009 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000003 R14: 00000000ffffffff R15: 00007ffddb3b8250 Allocated by task 1722: 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_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] __kmalloc_track_caller+0x10d/0x2d0 mm/slub.c:4449 __kmalloc_reserve net/core/skbuff.c:142 [inline] pskb_expand_head+0x123/0x1110 net/core/skbuff.c:1653 skb_ensure_writable+0x2e7/0x460 net/core/skbuff.c:5569 __bpf_try_make_writable net/core/filter.c:1635 [inline] bpf_try_make_writable net/core/filter.c:1641 [inline] bpf_try_make_head_writable net/core/filter.c:1649 [inline] ____bpf_clone_redirect net/core/filter.c:2145 [inline] bpf_clone_redirect+0x10b/0x380 net/core/filter.c:2123 bpf_prog_6893982b85ceadf7+0xac7/0x1000 bpf_call_func include/linux/filter.h:627 [inline] bpf_test_run+0x1ea/0x5d0 net/bpf/test_run.c:44 bpf_prog_test_run_skb+0x721/0xdc0 net/bpf/test_run.c:311 bpf_prog_test_run+0x21a/0x2a0 kernel/bpf/syscall.c:2124 __do_sys_bpf kernel/bpf/syscall.c:2909 [inline] __se_sys_bpf+0x49a/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 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 1722: 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 skb_free_head net/core/skbuff.c:601 [inline] skb_release_data+0x4ea/0x610 net/core/skbuff.c:621 skb_release_all net/core/skbuff.c:675 [inline] __kfree_skb net/core/skbuff.c:689 [inline] kfree_skb+0xbc/0x3a0 net/core/skbuff.c:708 vti6_tnl_xmit+0xb8e/0x1560 net/ipv6/ip6_vti.c:584 __netdev_start_xmit include/linux/netdevice.h:4544 [inline] netdev_start_xmit include/linux/netdevice.h:4558 [inline] xmit_one net/core/dev.c:3221 [inline] dev_hard_start_xmit+0x1ef/0x6f0 net/core/dev.c:3237 __dev_queue_xmit+0x1228/0x2400 net/core/dev.c:3821 dev_queue_xmit+0x17/0x20 net/core/dev.c:3854 __bpf_tx_skb net/core/filter.c:2063 [inline] __bpf_redirect_no_mac net/core/filter.c:2097 [inline] __bpf_redirect+0x699/0xe30 net/core/filter.c:2120 ____bpf_clone_redirect net/core/filter.c:2151 [inline] bpf_clone_redirect+0x242/0x380 net/core/filter.c:2123 bpf_prog_6893982b85ceadf7+0xac7/0x1000 bpf_call_func include/linux/filter.h:627 [inline] bpf_test_run+0x1ea/0x5d0 net/bpf/test_run.c:44 bpf_prog_test_run_skb+0x721/0xdc0 net/bpf/test_run.c:311 bpf_prog_test_run+0x21a/0x2a0 kernel/bpf/syscall.c:2124 __do_sys_bpf kernel/bpf/syscall.c:2909 [inline] __se_sys_bpf+0x49a/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 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881d89ce000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 448 bytes to the right of 4096-byte region [ffff8881d89ce000, ffff8881d89cf000) The buggy address belongs to the page: page:ffffea0007627200 refcount:1 mapcount:0 mapping:ffff8881f5c0c280 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c0c280 raw: 0000000000000000 0000000000040004 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 0x1d2a20(GFP_ATOMIC|__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_track_caller+0x17c/0x2d0 mm/slub.c:4449 __kmalloc_reserve net/core/skbuff.c:142 [inline] pskb_expand_head+0x123/0x1110 net/core/skbuff.c:1653 skb_ensure_writable+0x2e7/0x460 net/core/skbuff.c:5569 __bpf_try_make_writable net/core/filter.c:1635 [inline] bpf_try_make_writable net/core/filter.c:1641 [inline] bpf_try_make_head_writable net/core/filter.c:1649 [inline] ____bpf_clone_redirect net/core/filter.c:2145 [inline] bpf_clone_redirect+0x10b/0x380 net/core/filter.c:2123 bpf_prog_6893982b85ceadf7+0xac7/0x1000 bpf_call_func include/linux/filter.h:627 [inline] bpf_test_run+0x1ea/0x5d0 net/bpf/test_run.c:44 bpf_prog_test_run_skb+0x721/0xdc0 net/bpf/test_run.c:311 bpf_prog_test_run+0x21a/0x2a0 kernel/bpf/syscall.c:2124 __do_sys_bpf kernel/bpf/syscall.c:2909 [inline] __se_sys_bpf+0x49a/0x570 kernel/bpf/syscall.c:2849 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 kfree+0x1ca/0x260 mm/slub.c:4068 skb_free_head net/core/skbuff.c:601 [inline] pskb_expand_head+0x367/0x1110 net/core/skbuff.c:1686 __skb_cow include/linux/skbuff.h:3208 [inline] skb_cow_head include/linux/skbuff.h:3242 [inline] bpf_skb_net_grow net/core/filter.c:3070 [inline] ____bpf_skb_adjust_room net/core/filter.c:3237 [inline] bpf_skb_adjust_room+0x646/0x1910 net/core/filter.c:3199 0xffffffffa00b8eca bpf_call_func include/linux/filter.h:627 [inline] bpf_test_run+0x1ea/0x5d0 net/bpf/test_run.c:44 bpf_prog_test_run_skb+0x721/0xdc0 net/bpf/test_run.c:311 bpf_prog_test_run+0x21a/0x2a0 kernel/bpf/syscall.c:2124 __do_sys_bpf kernel/bpf/syscall.c:2909 [inline] __se_sys_bpf+0x49a/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 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881d89cf080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881d89cf100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881d89cf180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881d89cf200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881d89cf280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================