================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3ab9/0x5660 kernel/locking/lockdep.c:4923 Read of size 8 at addr ffff88807e499130 by task syz-executor.2/7268 CPU: 1 PID: 7268 Comm: syz-executor.2 Not tainted 5.19.0-rc6-syzkaller-00418-g972a278fe60c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 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 __lock_acquire+0x3ab9/0x5660 kernel/locking/lockdep.c:4923 lock_acquire kernel/locking/lockdep.c:5665 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630 lock_sock_nested+0x36/0xf0 net/core/sock.c:3389 lock_sock include/net/sock.h:1677 [inline] nr_recvmsg+0xb5/0x460 net/netrom/af_netrom.c:1155 sock_recvmsg_nosec net/socket.c:995 [inline] sock_recvmsg net/socket.c:1013 [inline] sock_recvmsg net/socket.c:1009 [inline] ____sys_recvmsg+0x2c7/0x600 net/socket.c:2707 ___sys_recvmsg+0x127/0x200 net/socket.c:2749 do_recvmmsg+0x254/0x6d0 net/socket.c:2843 __sys_recvmmsg net/socket.c:2922 [inline] __do_sys_recvmmsg net/socket.c:2945 [inline] __se_sys_recvmmsg net/socket.c:2938 [inline] __x64_sys_recvmmsg+0x20b/0x260 net/socket.c:2938 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+0x63/0xcd RIP: 0033:0x7f1476889199 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f147790e168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f147699c1d0 RCX: 00007f1476889199 RDX: 00000000000005dd RSI: 0000000020000540 RDI: 0000000000000004 RBP: 00007f14768e313b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000040012062 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffcedf61ff R14: 00007f147790e300 R15: 0000000000022000 Allocated by task 7233: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:605 [inline] sk_prot_alloc+0x110/0x290 net/core/sock.c:1975 sk_alloc+0x36/0x770 net/core/sock.c:2028 nr_create+0xb2/0x5f0 net/netrom/af_netrom.c:433 __sock_create+0x353/0x790 net/socket.c:1515 sock_create net/socket.c:1566 [inline] __sys_socket_create net/socket.c:1603 [inline] __sys_socket_create net/socket.c:1588 [inline] __sys_socket+0x12f/0x240 net/socket.c:1636 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1647 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+0x63/0xcd 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 sk_prot_free net/core/sock.c:2011 [inline] __sk_destruct+0x5e5/0x710 net/core/sock.c:2097 sk_destruct net/core/sock.c:2112 [inline] __sk_free+0x1a4/0x4a0 net/core/sock.c:2123 sk_free+0x78/0xa0 net/core/sock.c:2134 sock_put include/net/sock.h:1927 [inline] nr_heartbeat_expiry+0x2de/0x460 net/netrom/nr_timer.c:148 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x29b/0x9c2 kernel/softirq.c:571 The buggy address belongs to the object at ffff88807e499000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 304 bytes inside of 2048-byte region [ffff88807e499000, ffff88807e499800) The buggy address belongs to the physical page: page:ffffea0001f92600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7e498 head:ffffea0001f92600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888011842000 raw: 0000000000000000 0000000000080008 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3673, tgid 3673 (kworker/0:3), ts 193482512873, free_ts 189015472908 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] __alloc_skb+0xde/0x340 net/core/skbuff.c:426 alloc_skb include/linux/skbuff.h:1426 [inline] alloc_skb_with_frags+0x93/0x730 net/core/skbuff.c:5992 sock_alloc_send_pskb+0x793/0x920 net/core/sock.c:2662 sock_alloc_send_skb include/net/sock.h:1831 [inline] mld_newpack.isra.0+0x1b9/0x770 net/ipv6/mcast.c:1746 add_grhead+0x295/0x340 net/ipv6/mcast.c:1849 add_grec+0x1082/0x1560 net/ipv6/mcast.c:1987 mld_send_cr net/ipv6/mcast.c:2113 [inline] mld_ifc_work+0x452/0xdc0 net/ipv6/mcast.c:2651 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 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 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] kmem_cache_alloc_node+0x255/0x3f0 mm/slub.c:3293 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1426 [inline] nlmsg_new include/net/netlink.h:953 [inline] netlink_ack+0x1f0/0xa80 net/netlink/af_netlink.c:2436 netlink_rcv_skb+0x33d/0x420 net/netlink/af_netlink.c:2507 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:734 __sys_sendto+0x21a/0x320 net/socket.c:2119 __do_sys_sendto net/socket.c:2131 [inline] __se_sys_sendto net/socket.c:2127 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2127 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+0x63/0xcd Memory state around the buggy address: ffff88807e499000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807e499080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807e499100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807e499180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807e499200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================