================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: slab-out-of-bounds in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] BUG: KASAN: slab-out-of-bounds in __refcount_add include/linux/refcount.h:193 [inline] BUG: KASAN: slab-out-of-bounds in __refcount_inc include/linux/refcount.h:250 [inline] BUG: KASAN: slab-out-of-bounds in refcount_inc include/linux/refcount.h:267 [inline] BUG: KASAN: slab-out-of-bounds in sock_hold include/net/sock.h:721 [inline] BUG: KASAN: slab-out-of-bounds in nr_release+0x62/0x450 net/netrom/af_netrom.c:520 Write of size 4 at addr ffff888063c03080 by task syz-executor.5/19671 CPU: 1 PID: 19671 Comm: syz-executor.5 Not tainted 5.19.0-rc3-syzkaller-00167-ge65af5403e46 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] sock_hold include/net/sock.h:721 [inline] nr_release+0x62/0x450 net/netrom/af_netrom.c:520 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1365 __fput+0x277/0x9d0 fs/file_table.c:317 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xaff/0x2a00 kernel/exit.c:795 do_group_exit+0xd2/0x2f0 kernel/exit.c:925 get_signal+0x2542/0x2600 kernel/signal.c:2857 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:166 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f7def289109 Code: Unable to access opcode bytes at RIP 0x7f7def2890df. RSP: 002b:00007f7df0357168 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: fffffffffffffffc RBX: 00007f7def39c030 RCX: 00007f7def289109 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000000 RBP: 00007f7def2e305d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff69cc050f R14: 00007f7df0357300 R15: 0000000000022000 Allocated by task 0: (stack is not available) Freed by task 15: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1780 slab_free mm/slub.c:3536 [inline] kfree+0xd6/0x4d0 mm/slub.c:4584 skb_free_head+0xac/0x110 net/core/skbuff.c:655 skb_release_data+0x67a/0x810 net/core/skbuff.c:677 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb net/core/skbuff.c:756 [inline] kfree_skb_reason.part.0+0xe2/0x320 net/core/skbuff.c:778 kfree_skb_reason+0x85/0x110 include/linux/refcount.h:279 kfree_skb include/linux/skbuff.h:1375 [inline] netif_receive_generic_xdp+0x3ea/0x8a0 net/core/dev.c:4858 do_xdp_generic net/core/dev.c:4899 [inline] do_xdp_generic net/core/dev.c:4892 [inline] __netif_receive_skb_core+0x1200/0x3920 net/core/dev.c:5301 __netif_receive_skb_one_core+0xae/0x180 net/core/dev.c:5478 __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5594 netif_receive_skb_internal net/core/dev.c:5680 [inline] netif_receive_skb+0x13e/0x8e0 net/core/dev.c:5739 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] br_pass_frame_up+0x33b/0x460 net/bridge/br_input.c:68 br_handle_frame_finish+0xc6e/0x1a80 net/bridge/br_input.c:199 br_nf_hook_thresh+0x2f8/0x3d0 net/bridge/br_netfilter_hooks.c:1039 br_nf_pre_routing_finish_ipv6+0x67b/0xdf0 net/bridge/br_netfilter_ipv6.c:206 NF_HOOK include/linux/netfilter.h:307 [inline] br_nf_pre_routing_ipv6+0x42d/0x7b0 net/bridge/br_netfilter_ipv6.c:236 br_nf_pre_routing+0x14ad/0x1f00 net/bridge/br_netfilter_hooks.c:505 nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline] nf_hook_bridge_pre net/bridge/br_input.c:255 [inline] br_handle_frame+0x8df/0x1280 net/bridge/br_input.c:399 __netif_receive_skb_core+0xa13/0x3920 net/core/dev.c:5374 __netif_receive_skb_one_core+0xae/0x180 net/core/dev.c:5478 __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5594 process_backlog+0x3a0/0x7c0 net/core/dev.c:5922 __napi_poll+0xb3/0x6e0 net/core/dev.c:6488 napi_poll net/core/dev.c:6555 [inline] net_rx_action+0x9c1/0xd90 net/core/dev.c:6666 __do_softirq+0x29b/0x9c2 kernel/softirq.c:571 The buggy address belongs to the object at ffff888063c02000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 128 bytes to the right of 4096-byte region [ffff888063c02000, ffff888063c03000) The buggy address belongs to the physical page: page:ffffea00018f0000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x63c00 head:ffffea00018f0000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888011842140 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), pid 15, tgid 15 (ksoftirqd/0), ts 3066317127469, free_ts 3063842842665 prep_new_page mm/page_alloc.c:2456 [inline] get_page_from_freelist+0x1290/0x3b70 mm/page_alloc.c:4198 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5426 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1824 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x9c4/0xe20 mm/slub.c:3031 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3118 slab_alloc_node mm/slub.c:3209 [inline] __kmalloc_node_track_caller+0x2cb/0x360 mm/slub.c:4979 kmalloc_reserve net/core/skbuff.c:354 [inline] pskb_expand_head+0x15e/0x1070 net/core/skbuff.c:1695 netif_receive_generic_xdp+0x279/0x8a0 net/core/dev.c:4836 do_xdp_generic net/core/dev.c:4899 [inline] do_xdp_generic net/core/dev.c:4892 [inline] __netif_receive_skb_core+0x1200/0x3920 net/core/dev.c:5301 __netif_receive_skb_one_core+0xae/0x180 net/core/dev.c:5478 __netif_receive_skb+0x24/0x1b0 net/core/dev.c:5594 netif_receive_skb_internal net/core/dev.c:5680 [inline] netif_receive_skb+0x13e/0x8e0 net/core/dev.c:5739 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] br_pass_frame_up+0x33b/0x460 net/bridge/br_input.c:68 br_handle_frame_finish+0xc6e/0x1a80 net/bridge/br_input.c:199 br_nf_hook_thresh+0x2f8/0x3d0 net/bridge/br_netfilter_hooks.c:1039 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1371 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1421 free_unref_page_prepare mm/page_alloc.c:3343 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3438 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2548 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:750 [inline] slab_alloc_node mm/slub.c:3243 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x204/0x3b0 mm/slub.c:3268 vm_area_dup+0x88/0x3f0 kernel/fork.c:467 dup_mmap kernel/fork.c:641 [inline] dup_mm+0x5fa/0x1390 kernel/fork.c:1524 copy_mm kernel/fork.c:1576 [inline] copy_process+0x3bba/0x7020 kernel/fork.c:2240 kernel_clone+0xe7/0xab0 kernel/fork.c:2655 __do_sys_clone+0xba/0x100 kernel/fork.c:2789 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Memory state around the buggy address: ffff888063c02f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888063c03000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888063c03080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888063c03100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888063c03180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================