================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:400 [inline] BUG: KASAN: slab-use-after-free in __refcount_sub_and_test include/linux/refcount.h:389 [inline] BUG: KASAN: slab-use-after-free in __refcount_dec_and_test include/linux/refcount.h:432 [inline] BUG: KASAN: slab-use-after-free in refcount_dec_and_test include/linux/refcount.h:450 [inline] BUG: KASAN: slab-use-after-free in skb_unref include/linux/skbuff.h:1292 [inline] BUG: KASAN: slab-use-after-free in __sk_skb_reason_drop net/core/skbuff.c:1205 [inline] BUG: KASAN: slab-use-after-free in sk_skb_reason_drop+0x37/0x170 net/core/skbuff.c:1233 Write of size 4 at addr ffff88801a3f7c24 by task syz.0.0/5332 CPU: 0 UID: 0 PID: 5332 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:400 [inline] __refcount_sub_and_test include/linux/refcount.h:389 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] skb_unref include/linux/skbuff.h:1292 [inline] __sk_skb_reason_drop net/core/skbuff.c:1205 [inline] sk_skb_reason_drop+0x37/0x170 net/core/skbuff.c:1233 kfree_skb_reason include/linux/skbuff.h:1322 [inline] kfree_skb include/linux/skbuff.h:1331 [inline] nr_transmit_buffer+0x11d/0x1b0 net/netrom/nr_out.c:212 nr_establish_data_link+0x62/0xb0 net/netrom/nr_out.c:229 nr_connect+0x6e6/0xde0 net/netrom/af_netrom.c:723 __sys_connect_file net/socket.c:2089 [inline] __sys_connect+0x316/0x440 net/socket.c:2108 __do_sys_connect net/socket.c:2114 [inline] __se_sys_connect net/socket.c:2111 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2111 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f36ccb8f7c9 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:00007f36cd990038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f36ccde6090 RCX: 00007f36ccb8f7c9 RDX: 0000000000000048 RSI: 0000200000000300 RDI: 0000000000000006 RBP: 00007f36ccc13f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f36ccde6128 R14: 00007f36ccde6090 R15: 00007fff8d77a378 Allocated by task 5332: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x43c/0x720 mm/slub.c:5315 __alloc_skb+0x1dc/0x3a0 net/core/skbuff.c:679 alloc_skb include/linux/skbuff.h:1383 [inline] nr_write_internal+0xe2/0xc60 net/netrom/nr_subr.c:144 nr_establish_data_link+0x62/0xb0 net/netrom/nr_out.c:229 nr_connect+0x6e6/0xde0 net/netrom/af_netrom.c:723 __sys_connect_file net/socket.c:2089 [inline] __sys_connect+0x316/0x440 net/socket.c:2108 __do_sys_connect net/socket.c:2114 [inline] __se_sys_connect net/socket.c:2111 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2111 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5332: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kmem_cache_free+0x197/0x620 mm/slub.c:6781 kfree_skb_reason include/linux/skbuff.h:1322 [inline] kfree_skb include/linux/skbuff.h:1331 [inline] nr_route_frame+0x467/0x7e0 net/netrom/nr_route.c:820 nr_transmit_buffer+0xe7/0x1b0 net/netrom/nr_out.c:211 nr_establish_data_link+0x62/0xb0 net/netrom/nr_out.c:229 nr_connect+0x6e6/0xde0 net/netrom/af_netrom.c:723 __sys_connect_file net/socket.c:2089 [inline] __sys_connect+0x316/0x440 net/socket.c:2108 __do_sys_connect net/socket.c:2114 [inline] __se_sys_connect net/socket.c:2111 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2111 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88801a3f7b40 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 228 bytes inside of freed 240-byte region [ffff88801a3f7b40, ffff88801a3f7c30) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a3f7 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801badadc0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800c000c 00000000f5000000 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5328, tgid 5328 (kworker/0:5), ts 75150773028, free_ts 73059053016 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0x24e0/0x2580 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xe53/0x1820 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_node_noprof+0x4ce/0x720 mm/slub.c:5315 __alloc_skb+0x1dc/0x3a0 net/core/skbuff.c:679 __pskb_copy_fclone+0xa8/0xfb0 net/core/skbuff.c:2201 __pskb_copy include/linux/skbuff.h:1447 [inline] hsr_create_tagged_frame+0x24e/0xe10 net/hsr/hsr_forward.c:350 hsr_forward_do net/hsr/hsr_forward.c:-1 [inline] hsr_forward_skb+0x1013/0x2860 net/hsr/hsr_forward.c:743 hsr_dev_xmit+0x242/0x360 net/hsr/hsr_device.c:236 __netdev_start_xmit include/linux/netdevice.h:5273 [inline] netdev_start_xmit include/linux/netdevice.h:5282 [inline] xmit_one net/core/dev.c:3853 [inline] dev_hard_start_xmit+0x2cd/0x800 net/core/dev.c:3869 __dev_queue_xmit+0x149d/0x31c0 net/core/dev.c:4819 __ip6_finish_output net/ipv6/ip6_output.c:-1 [inline] ip6_finish_output+0x234/0x7d0 net/ipv6/ip6_output.c:220 page last free pid 79 tgid 79 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xc8e/0x1720 kernel/rcu/tree.c:2857 handle_softirqs+0x22b/0x7c0 kernel/softirq.c:622 do_softirq+0x76/0xd0 kernel/softirq.c:523 __local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450 spin_unlock_bh include/linux/spinlock.h:396 [inline] crypto_acomp_unlock_stream_bh include/crypto/internal/acompress.h:200 [inline] scomp_acomp_comp_decomp+0x6ef/0x9e0 crypto/scompress.c:259 crypto_acomp_compress+0x42f/0xb20 crypto/acompress.c:291 zswap_compress mm/zswap.c:886 [inline] zswap_store_page mm/zswap.c:1428 [inline] zswap_store+0xdc6/0x1f10 mm/zswap.c:1539 swap_writeout+0x710/0xd70 mm/page_io.c:275 writeout mm/vmscan.c:651 [inline] pageout mm/vmscan.c:698 [inline] shrink_folio_list+0x323f/0x4f90 mm/vmscan.c:1418 evict_folios+0x473e/0x57f0 mm/vmscan.c:4711 try_to_shrink_lruvec+0x8a3/0xb50 mm/vmscan.c:4874 shrink_one+0x25c/0x720 mm/vmscan.c:4919 shrink_many mm/vmscan.c:4982 [inline] lru_gen_shrink_node mm/vmscan.c:5060 [inline] shrink_node+0x2f7d/0x35b0 mm/vmscan.c:6047 kswapd_shrink_node mm/vmscan.c:6901 [inline] balance_pgdat mm/vmscan.c:7084 [inline] kswapd+0x145a/0x2820 mm/vmscan.c:7354 kthread+0x711/0x8a0 kernel/kthread.c:463 Memory state around the buggy address: ffff88801a3f7b00: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88801a3f7b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801a3f7c00: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff88801a3f7c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801a3f7d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ==================================================================