================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x79/0x1f60 kernel/locking/lockdep.c:4925 Read of size 8 at addr ffff88801d1c1130 by task syz-executor.4/5672 CPU: 1 PID: 5672 Comm: syz-executor.4 Not tainted 6.1.0-rc5-syzkaller-00015-g81e7cfa3a9eb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x220 mm/kasan/report.c:395 kasan_report+0x139/0x170 mm/kasan/report.c:495 __lock_acquire+0x79/0x1f60 kernel/locking/lockdep.c:4925 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 lock_sock_nested+0x44/0xf0 net/core/sock.c:3447 lock_sock include/net/sock.h:1721 [inline] nr_accept+0x510/0x660 net/netrom/af_netrom.c:805 do_accept+0x4d0/0x6d0 net/socket.c:1856 __sys_accept4_file net/socket.c:1897 [inline] __sys_accept4+0x97/0x100 net/socket.c:1927 __do_sys_accept net/socket.c:1944 [inline] __se_sys_accept net/socket.c:1941 [inline] __x64_sys_accept+0x79/0x90 net/socket.c:1941 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fc3d5e8b639 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:00007fc3d6c60168 EFLAGS: 00000246 ORIG_RAX: 000000000000002b RAX: ffffffffffffffda RBX: 00007fc3d5fac050 RCX: 00007fc3d5e8b639 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fc3d5ee6ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcac07eedf R14: 00007fc3d6c60300 R15: 0000000000022000 Allocated by task 5657: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xaf/0x1a0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] sk_prot_alloc+0xde/0x200 net/core/sock.c:2030 sk_alloc+0x36/0x340 net/core/sock.c:2083 nr_create+0x9d/0x500 net/netrom/af_netrom.c:433 __sock_create+0x3fd/0x850 net/socket.c:1515 sock_create net/socket.c:1566 [inline] __sys_socket_create net/socket.c:1603 [inline] __sys_socket+0x137/0x3a0 net/socket.c:1636 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 21: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:511 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x71/0x110 mm/slub.c:3674 sk_prot_free net/core/sock.c:2066 [inline] __sk_destruct+0x487/0x5d0 net/core/sock.c:2152 call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers+0x76a/0x980 kernel/time/timer.c:1790 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803 __do_softirq+0x277/0x75b kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:481 insert_work+0x54/0x3e0 kernel/workqueue.c:1358 __queue_work+0xaaa/0xd60 kernel/workqueue.c:1517 queue_work_on+0x137/0x240 kernel/workqueue.c:1545 queue_work include/linux/workqueue.h:503 [inline] io_ring_ctx_wait_and_kill+0x34e/0x3bd io_uring/io_uring.c:2826 io_uring_release+0x59/0x70 io_uring/io_uring.c:2834 __fput+0x3ba/0x880 fs/file_table.c:320 task_work_run+0x243/0x300 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x664/0x2070 kernel/exit.c:820 do_group_exit+0x1fd/0x2b0 kernel/exit.c:950 get_signal+0x1743/0x1810 kernel/signal.c:2858 arch_do_signal_or_restart+0x8d/0x750 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801d1c1000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 304 bytes inside of 2048-byte region [ffff88801d1c1000, ffff88801d1c1800) The buggy address belongs to the physical page: page:ffffea0000747000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d1c0 head:ffffea0000747000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888012842000 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 7, tgid 7 (kworker/0:0), ts 186612234176, free_ts 186269233881 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4288 __alloc_pages+0x259/0x560 mm/page_alloc.c:5555 alloc_slab_page+0x70/0xf0 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:437 [inline] __alloc_skb+0x11d/0x620 net/core/skbuff.c:509 alloc_skb include/linux/skbuff.h:1267 [inline] alloc_skb_with_frags+0xb4/0x780 net/core/skbuff.c:6126 sock_alloc_send_pskb+0x930/0xa70 net/core/sock.c:2719 sock_alloc_send_skb include/net/sock.h:1884 [inline] mld_newpack+0x1e0/0xa90 net/ipv6/mcast.c:1748 add_grhead+0x5e/0x290 net/ipv6/mcast.c:1851 add_grec+0x14c9/0x17c0 net/ipv6/mcast.c:1989 mld_send_initial_cr+0x1f6/0x370 net/ipv6/mcast.c:2236 ipv6_mc_dad_complete+0x81/0x390 net/ipv6/mcast.c:2247 addrconf_dad_completed+0x678/0xc90 net/ipv6/addrconf.c:4228 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3483 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1cc/0x300 mm/slub.c:3422 mt_alloc_one lib/maple_tree.c:152 [inline] mas_alloc_nodes+0x1fd/0x650 lib/maple_tree.c:1226 mas_node_count_gfp lib/maple_tree.c:1310 [inline] mas_preallocate+0x133/0x340 lib/maple_tree.c:5717 vma_expand+0x261/0x9c0 mm/mmap.c:542 mmap_region+0xcf1/0x1e60 mm/mmap.c:2592 do_mmap+0x8d9/0xf30 mm/mmap.c:1412 vm_mmap_pgoff+0x1e5/0x2f0 mm/util.c:520 ksys_mmap_pgoff+0x48c/0x6d0 mm/mmap.c:1458 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88801d1c1000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d1c1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801d1c1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801d1c1180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d1c1200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================