================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:1131 [inline] BUG: KASAN: use-after-free in consume_skb+0x3a/0x1f0 net/core/skbuff.c:926 Read of size 4 at addr ffff88811d39d86c by task syz.3.259/1135 CPU: 1 PID: 1135 Comm: syz.3.259 Not tainted 5.15.185-syzkaller-00339-ge678c93d43cc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1131 [inline] consume_skb+0x3a/0x1f0 net/core/skbuff.c:926 __sk_msg_free+0x4f4/0x560 net/core/skmsg.c:205 sk_msg_free net/core/skmsg.c:218 [inline] __sk_psock_purge_ingress_msg net/core/skmsg.c:773 [inline] __sk_psock_zap_ingress net/core/skmsg.c:791 [inline] sk_psock_stop+0x4c9/0x570 net/core/skmsg.c:809 sk_psock_drop+0x226/0x300 net/core/skmsg.c:848 sk_psock_put include/linux/skmsg.h:463 [inline] sock_map_unref+0x3c2/0x420 net/core/sock_map.c:184 __sock_map_delete net/core/sock_map.c:425 [inline] sock_map_delete_from_link net/core/sock_map.c:438 [inline] sock_map_unlink net/core/sock_map.c:1497 [inline] sock_map_remove_links+0x3cd/0x600 net/core/sock_map.c:1512 sock_map_close+0x111/0x440 net/core/sock_map.c:1549 unix_release+0x82/0xc0 net/unix/af_unix.c:936 __sock_release net/socket.c:649 [inline] sock_close+0xe0/0x270 net/socket.c:1336 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fe602f10929 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:00007ffd3bd5ed68 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007fe603139ba0 RCX: 00007fe602f10929 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 00007fe603139ba0 R08: 0000000000000000 R09: 0000000a3bd5f05f R10: 000000000003fd84 R11: 0000000000000246 R12: 000000000000bec0 R13: 00007ffd3bd5ee60 R14: ffffffffffffffff R15: 00007ffd3bd5ee80 Allocated by task 1136: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3255 skb_clone+0x1cf/0x360 net/core/skbuff.c:1547 sk_psock_verdict_recv+0x53/0x800 net/core/skmsg.c:1187 unix_read_sock+0x10a/0x2c0 net/unix/af_unix.c:2428 sk_psock_verdict_data_ready+0x115/0x170 net/core/skmsg.c:1230 unix_dgram_sendmsg+0x11e6/0x1880 net/unix/af_unix.c:1942 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436 ___sys_sendmsg+0x1f0/0x260 net/socket.c:2490 __sys_sendmsg net/socket.c:2519 [inline] __do_sys_sendmsg net/socket.c:2528 [inline] __se_sys_sendmsg net/socket.c:2526 [inline] __x64_sys_sendmsg+0x1e2/0x2a0 net/socket.c:2526 x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 373: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3539 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1 __kfree_skb net/core/skbuff.c:758 [inline] kfree_skb_reason net/core/skbuff.c:778 [inline] kfree_skb+0xc1/0x2f0 net/core/skbuff.c:792 sock_drop include/linux/skmsg.h:312 [inline] sk_psock_backlog+0xa85/0xd80 net/core/skmsg.c:684 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88811d39d780 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 236 bytes inside of 248-byte region [ffff88811d39d780, ffff88811d39d878) The buggy address belongs to the page: page:ffffea000474e740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11d39d flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea0004747540 0000000800000008 ffff8881081aa000 raw: 0000000000000000 00000000800c000c 00000001ffffffff 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 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 226, ts 15311818518, free_ts 15121087848 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5789 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1932 [inline] new_slab+0xa1/0x4d0 mm/slub.c:1995 ___slab_alloc+0x381/0x810 mm/slub.c:3028 __slab_alloc+0x49/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3255 skb_clone+0x1cf/0x360 net/core/skbuff.c:1547 dev_queue_xmit_nit+0x269/0xa40 net/core/dev.c:2349 xmit_one net/core/dev.c:3652 [inline] dev_hard_start_xmit+0x163/0x670 net/core/dev.c:3673 sch_direct_xmit+0x267/0x8d0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3892 [inline] __dev_queue_xmit+0x1523/0x2d80 net/core/dev.c:4261 dev_queue_xmit+0x17/0x20 net/core/dev.c:4329 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb7c/0xe60 net/ipv4/ip_output.c:228 __ip_finish_output+0x161/0x360 net/ipv4/ip_output.c:-1 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page+0xa2/0x550 mm/page_alloc.c:3616 __put_single_page mm/swap.c:98 [inline] __put_page+0xad/0xe0 mm/swap.c:129 put_page include/linux/mm.h:1295 [inline] anon_pipe_buf_release+0x183/0x200 fs/pipe.c:137 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x53d/0xfe0 fs/pipe.c:323 call_read_iter include/linux/fs.h:2198 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x68b/0xbe0 fs/read_write.c:485 ksys_read+0x140/0x240 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x96d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88811d39d700: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc ffff88811d39d780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88811d39d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ^ ffff88811d39d880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88811d39d900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: double-free or invalid-free in slab_free mm/slub.c:3521 [inline] BUG: KASAN: double-free or invalid-free in kmem_cache_free+0x100/0x320 mm/slub.c:3539 CPU: 1 PID: 1135 Comm: syz.3.259 Tainted: G B 5.15.185-syzkaller-00339-ge678c93d43cc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 kasan_report_invalid_free+0x58/0x90 mm/kasan/report.c:370 ____kasan_slab_free+0x13d/0x160 mm/kasan/common.c:-1 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3539 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1 __kfree_skb net/core/skbuff.c:758 [inline] consume_skb+0xb3/0x1f0 net/core/skbuff.c:930 __sk_msg_free+0x4f4/0x560 net/core/skmsg.c:205 sk_msg_free net/core/skmsg.c:218 [inline] __sk_psock_purge_ingress_msg net/core/skmsg.c:773 [inline] __sk_psock_zap_ingress net/core/skmsg.c:791 [inline] sk_psock_stop+0x4c9/0x570 net/core/skmsg.c:809 sk_psock_drop+0x226/0x300 net/core/skmsg.c:848 sk_psock_put include/linux/skmsg.h:463 [inline] sock_map_unref+0x3c2/0x420 net/core/sock_map.c:184 __sock_map_delete net/core/sock_map.c:425 [inline] sock_map_delete_from_link net/core/sock_map.c:438 [inline] sock_map_unlink net/core/sock_map.c:1497 [inline] sock_map_remove_links+0x3cd/0x600 net/core/sock_map.c:1512 sock_map_close+0x111/0x440 net/core/sock_map.c:1549 unix_release+0x82/0xc0 net/unix/af_unix.c:936 __sock_release net/socket.c:649 [inline] sock_close+0xe0/0x270 net/socket.c:1336 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fe602f10929 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:00007ffd3bd5ed68 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007fe603139ba0 RCX: 00007fe602f10929 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 00007fe603139ba0 R08: 0000000000000000 R09: 0000000a3bd5f05f R10: 000000000003fd84 R11: 0000000000000246 R12: 000000000000bec0 R13: 00007ffd3bd5ee60 R14: ffffffffffffffff R15: 00007ffd3bd5ee80 Allocated by task 1136: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3255 skb_clone+0x1cf/0x360 net/core/skbuff.c:1547 sk_psock_verdict_recv+0x53/0x800 net/core/skmsg.c:1187 unix_read_sock+0x10a/0x2c0 net/unix/af_unix.c:2428 sk_psock_verdict_data_ready+0x115/0x170 net/core/skmsg.c:1230 unix_dgram_sendmsg+0x11e6/0x1880 net/unix/af_unix.c:1942 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436 ___sys_sendmsg+0x1f0/0x260 net/socket.c:2490 __sys_sendmsg net/socket.c:2519 [inline] __do_sys_sendmsg net/socket.c:2528 [inline] __se_sys_sendmsg net/socket.c:2526 [inline] __x64_sys_sendmsg+0x1e2/0x2a0 net/socket.c:2526 x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 373: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3539 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1 __kfree_skb net/core/skbuff.c:758 [inline] kfree_skb_reason net/core/skbuff.c:778 [inline] kfree_skb+0xc1/0x2f0 net/core/skbuff.c:792 sock_drop include/linux/skmsg.h:312 [inline] sk_psock_backlog+0xa85/0xd80 net/core/skmsg.c:684 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88811d39d780 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 0 bytes inside of 248-byte region [ffff88811d39d780, ffff88811d39d878) The buggy address belongs to the page: page:ffffea000474e740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11d39d flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea0004747540 0000000800000008 ffff8881081aa000 raw: 0000000000000000 00000000800c000c 00000001ffffffff 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 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 226, ts 15311818518, free_ts 15121087848 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5789 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1932 [inline] new_slab+0xa1/0x4d0 mm/slub.c:1995 ___slab_alloc+0x381/0x810 mm/slub.c:3028 __slab_alloc+0x49/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3255 skb_clone+0x1cf/0x360 net/core/skbuff.c:1547 dev_queue_xmit_nit+0x269/0xa40 net/core/dev.c:2349 xmit_one net/core/dev.c:3652 [inline] dev_hard_start_xmit+0x163/0x670 net/core/dev.c:3673 sch_direct_xmit+0x267/0x8d0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3892 [inline] __dev_queue_xmit+0x1523/0x2d80 net/core/dev.c:4261 dev_queue_xmit+0x17/0x20 net/core/dev.c:4329 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb7c/0xe60 net/ipv4/ip_output.c:228 __ip_finish_output+0x161/0x360 net/ipv4/ip_output.c:-1 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page+0xa2/0x550 mm/page_alloc.c:3616 __put_single_page mm/swap.c:98 [inline] __put_page+0xad/0xe0 mm/swap.c:129 put_page include/linux/mm.h:1295 [inline] anon_pipe_buf_release+0x183/0x200 fs/pipe.c:137 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x53d/0xfe0 fs/pipe.c:323 call_read_iter include/linux/fs.h:2198 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x68b/0xbe0 fs/read_write.c:485 ksys_read+0x140/0x240 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x96d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88811d39d680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811d39d700: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc >ffff88811d39d780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811d39d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff88811d39d880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================