================================================================== 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:1066 [inline] BUG: KASAN: use-after-free in consume_skb+0x27/0x110 net/core/skbuff.c:907 Read of size 4 at addr ffff88807cbb75dc by task syz-executor.0/19337 CPU: 1 PID: 19337 Comm: syz-executor.0 Not tainted 5.15.0-rc6-syzkaller #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+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x66/0x3e0 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 kasan_check_range+0x2b5/0x2f0 mm/kasan/generic.c:189 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:1066 [inline] consume_skb+0x27/0x110 net/core/skbuff.c:907 __sk_msg_free+0x672/0x710 net/core/skmsg.c:196 sk_msg_free net/core/skmsg.c:209 [inline] __sk_psock_purge_ingress_msg net/core/skmsg.c:724 [inline] __sk_psock_zap_ingress net/core/skmsg.c:742 [inline] sk_psock_stop+0x3f5/0x4a0 net/core/skmsg.c:760 sock_map_close+0x4a5/0x720 net/core/sock_map.c:1516 unix_release+0x7e/0xc0 net/unix/af_unix.c:948 __sock_release net/socket.c:649 [inline] sock_close+0xd8/0x260 net/socket.c:1314 __fput+0x3fe/0x870 fs/file_table.c:280 task_work_run+0x146/0x1c0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x209/0x220 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:300 do_syscall_64+0x53/0xd0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f3d491f367b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007ffcc71bbbd0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 00007f3d491f367b RDX: 0000000000000000 RSI: ffffffff848922fb RDI: 0000000000000005 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b30322ee8 R10: 0000000000000a6c R11: 0000000000000293 R12: 00007f3d49344b60 R13: 00007f3d49344b60 R14: 00007f3d49343f60 R15: 00000000000cddb4 Allocated by task 19338: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3213 [inline] slab_alloc mm/slub.c:3221 [inline] kmem_cache_alloc+0x1c3/0x300 mm/slub.c:3226 skb_clone+0x1b4/0x360 net/core/skbuff.c:1520 sk_psock_verdict_recv+0x68/0x670 net/core/skmsg.c:1120 unix_read_sock+0x130/0x370 net/unix/af_unix.c:2420 sk_psock_verdict_data_ready+0x166/0x1e0 net/core/skmsg.c:1163 unix_dgram_sendmsg+0x19cc/0x2a50 net/unix/af_unix.c:1941 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg net/socket.c:724 [inline] ____sys_sendmsg+0x5b9/0x910 net/socket.c:2409 ___sys_sendmsg net/socket.c:2463 [inline] __sys_sendmmsg+0x57e/0x800 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 8581: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0x10d/0x150 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1700 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1726 slab_free mm/slub.c:3492 [inline] kmem_cache_free+0x95/0x190 mm/slub.c:3508 sock_drop include/linux/skmsg.h:309 [inline] sk_psock_backlog+0xf00/0x1060 net/core/skmsg.c:644 process_one_work+0x853/0x1140 kernel/workqueue.c:2297 worker_thread+0xac1/0x1320 kernel/workqueue.c:2444 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff88807cbb7500 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 220 bytes inside of 232-byte region [ffff88807cbb7500, ffff88807cbb75e8) The buggy address belongs to the page: page:ffffea0001f2edc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cbb7 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 0000000700000001 ffff8880165a2280 raw: 0000000000000000 00000000000c000c 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 8581, ts 772967905949, free_ts 772963479746 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4153 __alloc_pages+0x255/0x580 mm/page_alloc.c:5375 alloc_slab_page mm/slub.c:1770 [inline] allocate_slab+0xcc/0x4d0 mm/slub.c:1907 new_slab mm/slub.c:1970 [inline] ___slab_alloc+0x41e/0xc40 mm/slub.c:3001 __slab_alloc mm/slub.c:3088 [inline] slab_alloc_node mm/slub.c:3179 [inline] kmem_cache_alloc_node+0x2ad/0x340 mm/slub.c:3249 __alloc_skb+0xd8/0x580 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1116 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:664 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:721 [inline] nsim_dev_trap_report_work+0x274/0xb20 drivers/net/netdevsim/dev.c:762 process_one_work+0x853/0x1140 kernel/workqueue.c:2297 worker_thread+0xac1/0x1320 kernel/workqueue.c:2444 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0xc29/0xd20 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page_list+0x11f/0xa50 mm/page_alloc.c:3431 release_pages+0x18cb/0x1b00 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu+0x780/0x910 mm/mmu_gather.c:249 tlb_finish_mmu+0xcb/0x200 mm/mmu_gather.c:340 exit_mmap+0x3dd/0x6f0 mm/mmap.c:3173 __mmput+0x111/0x3a0 kernel/fork.c:1115 free_bprm+0x136/0x2f0 fs/exec.c:1483 kernel_execve+0x740/0x9a0 fs/exec.c:1980 call_usermodehelper_exec_async+0x262/0x3b0 kernel/umh.c:112 ret_from_fork+0x1f/0x30 Memory state around the buggy address: ffff88807cbb7480: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88807cbb7500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807cbb7580: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ^ ffff88807cbb7600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88807cbb7680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================