================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3d86/0x54a0 kernel/locking/lockdep.c:4885 Read of size 8 at addr ffff888079cca120 by task syz-executor.1/8662 CPU: 1 PID: 8662 Comm: syz-executor.1 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+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 __lock_acquire+0x3d86/0x54a0 kernel/locking/lockdep.c:4885 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 lock_sock_nested+0x2f/0xf0 net/core/sock.c:3203 lock_sock include/net/sock.h:1615 [inline] nr_accept+0x36f/0x640 net/netrom/af_netrom.c:805 do_accept+0x382/0x510 net/socket.c:1773 __sys_accept4_file+0x7e/0xe0 net/socket.c:1816 __sys_accept4+0xb0/0x100 net/socket.c:1846 __do_sys_accept net/socket.c:1864 [inline] __se_sys_accept net/socket.c:1861 [inline] __x64_sys_accept+0x71/0xb0 net/socket.c:1861 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+0x44/0xae RIP: 0033:0x7f10ff678a39 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f10fcbcd188 EFLAGS: 00000246 ORIG_RAX: 000000000000002b RAX: ffffffffffffffda RBX: 00007f10ff77c020 RCX: 00007f10ff678a39 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f10ff6d2e8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff839750ff R14: 00007f10fcbcd300 R15: 0000000000022000 Allocated by task 8650: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa4/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:596 [inline] sk_prot_alloc+0x110/0x290 net/core/sock.c:1839 sk_alloc+0x30/0xa60 net/core/sock.c:1892 nr_create+0xb2/0x5f0 net/netrom/af_netrom.c:433 __sock_create+0x353/0x790 net/socket.c:1464 sock_create net/socket.c:1515 [inline] __sys_socket+0xef/0x200 net/socket.c:1557 __do_sys_socket net/socket.c:1566 [inline] __se_sys_socket net/socket.c:1564 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1564 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+0x44/0xae Freed by task 19: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1700 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1726 slab_free mm/slub.c:3492 [inline] kfree+0xf3/0x550 mm/slub.c:4552 sk_prot_free net/core/sock.c:1875 [inline] __sk_destruct+0x6a8/0x900 net/core/sock.c:1961 sk_destruct+0xbd/0xe0 net/core/sock.c:1976 __sk_free+0xef/0x3d0 net/core/sock.c:1987 sk_free+0x78/0xa0 net/core/sock.c:1998 sock_put include/net/sock.h:1848 [inline] nr_heartbeat_expiry+0x2e7/0x460 net/netrom/nr_timer.c:148 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 The buggy address belongs to the object at ffff888079cca000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 288 bytes inside of 2048-byte region [ffff888079cca000, ffff888079cca800) The buggy address belongs to the page: page:ffffea0001e73200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888079ccf000 pfn:0x79cc8 head:ffffea0001e73200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00022e4808 ffffea0001395e08 ffff888010c42000 raw: ffff888079ccf000 0000000000080003 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8304, ts 897277440805, free_ts 897239584194 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2191 alloc_slab_page mm/slub.c:1770 [inline] allocate_slab mm/slub.c:1907 [inline] new_slab+0x319/0x490 mm/slub.c:1970 ___slab_alloc+0x950/0x1050 mm/slub.c:3001 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3088 slab_alloc_node mm/slub.c:3179 [inline] __kmalloc_node_track_caller+0x2d2/0x340 mm/slub.c:4947 kmalloc_reserve net/core/skbuff.c:355 [inline] __alloc_skb+0xde/0x340 net/core/skbuff.c:426 alloc_skb_fclone include/linux/skbuff.h:1166 [inline] tipc_buf_acquire+0x25/0xe0 net/tipc/msg.c:72 tipc_msg_build+0x7a1/0x10b0 net/tipc/msg.c:449 tipc_sendmcast+0x7b4/0xdd0 net/tipc/socket.c:880 __tipc_sendmsg+0x1083/0x17e0 net/tipc/socket.c:1466 tipc_sendmsg+0x4c/0x70 net/tipc/socket.c:1402 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2998 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504 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+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3394 __unfreeze_partials+0x340/0x360 mm/slub.c:2502 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x95/0xb0 mm/kasan/common.c:444 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] kmem_cache_alloc_node+0x259/0x3d0 mm/slub.c:3249 __alloc_skb+0x20b/0x340 net/core/skbuff.c:414 alloc_skb_fclone include/linux/skbuff.h:1166 [inline] tipc_buf_acquire+0x25/0xe0 net/tipc/msg.c:72 tipc_msg_build+0x556/0x10b0 net/tipc/msg.c:418 tipc_sendmcast+0x7b4/0xdd0 net/tipc/socket.c:880 __tipc_sendmsg+0x1083/0x17e0 net/tipc/socket.c:1466 tipc_sendmsg+0x4c/0x70 net/tipc/socket.c:1402 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2998 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504 Memory state around the buggy address: ffff888079cca000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079cca080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888079cca100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888079cca180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079cca200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================