================================================================== BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x261/0x2a0 kernel/locking/spinlock_debug.c:114 Read of size 4 at addr ffff888026fca09c by task syz-executor.4/8054 CPU: 1 PID: 8054 Comm: syz-executor.4 Not tainted 6.0.0-rc3-next-20220901-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] do_raw_spin_lock+0x261/0x2a0 kernel/locking/spinlock_debug.c:114 spin_lock_bh include/linux/spinlock.h:354 [inline] lock_sock_nested+0x5b/0xf0 net/core/sock.c:3439 lock_sock include/net/sock.h:1726 [inline] nr_accept+0x373/0x640 net/netrom/af_netrom.c:805 do_accept+0x37c/0x510 net/socket.c:1856 __sys_accept4_file net/socket.c:1897 [inline] __sys_accept4+0x96/0x120 net/socket.c:1927 __do_sys_accept net/socket.c:1944 [inline] __se_sys_accept net/socket.c:1941 [inline] __x64_sys_accept+0x71/0xb0 net/socket.c:1941 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:0x7fdf86a893c9 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:00007fdf861de168 EFLAGS: 00000246 ORIG_RAX: 000000000000002b RAX: ffffffffffffffda RBX: 00007fdf86b9c050 RCX: 00007fdf86a893c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fdf86ae433f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd4fe555bf R14: 00007fdf861de300 R15: 0000000000022000 Allocated by task 8044: 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:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kasan_kmalloc include/linux/kasan.h:234 [inline] __do_kmalloc_node mm/slab_common.c:930 [inline] __kmalloc+0x54/0xc0 mm/slab_common.c:943 kmalloc include/linux/slab.h:564 [inline] sk_prot_alloc+0x143/0x290 net/core/sock.c:2019 sk_alloc+0x36/0x770 net/core/sock.c:2072 nr_create+0xb2/0x5f0 net/netrom/af_netrom.c:433 __sock_create+0x355/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 8083: 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:367 [inline] ____kasan_slab_free+0x166/0x1c0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1651 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1677 slab_free mm/slub.c:3580 [inline] __kmem_cache_free+0xab/0x3b0 mm/slub.c:3593 sk_prot_free net/core/sock.c:2055 [inline] __sk_destruct+0x5e0/0x710 net/core/sock.c:2141 sk_destruct net/core/sock.c:2156 [inline] __sk_free+0x175/0x460 net/core/sock.c:2167 sk_free+0x78/0xa0 net/core/sock.c:2178 sock_put include/net/sock.h:1983 [inline] nr_heartbeat_expiry+0x1d3/0x450 net/netrom/nr_timer.c:148 call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x674/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+0x1d3/0x9c6 kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 call_rcu+0x99/0x790 kernel/rcu/tree.c:2796 netlink_release+0xeff/0x1db0 net/netlink/af_netlink.c:815 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0x16b/0x270 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xc3f/0x2b60 kernel/exit.c:818 do_group_exit+0xd0/0x2a0 kernel/exit.c:948 __do_sys_exit_group kernel/exit.c:959 [inline] __se_sys_exit_group kernel/exit.c:957 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:957 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 The buggy address belongs to the object at ffff888026fca000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 156 bytes inside of 2048-byte region [ffff888026fca000, ffff888026fca800) The buggy address belongs to the physical page: page:ffffea00009bf200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26fc8 head:ffffea00009bf200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 10597974341, free_ts 0 prep_new_page mm/page_alloc.c:2534 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4284 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5542 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2113 alloc_pages+0x22f/0x270 mm/mempolicy.c:2275 alloc_slab_page mm/slub.c:1721 [inline] allocate_slab+0x228/0x370 mm/slub.c:1866 new_slab mm/slub.c:1919 [inline] ___slab_alloc+0xad0/0x1440 mm/slub.c:3100 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3198 slab_alloc_node mm/slub.c:3283 [inline] __kmem_cache_alloc_node+0x18a/0x3d0 mm/slub.c:3356 __do_kmalloc_node mm/slab_common.c:929 [inline] __kmalloc_node_track_caller+0x45/0xc0 mm/slab_common.c:950 kmalloc_reserve net/core/skbuff.c:358 [inline] __alloc_skb+0xd9/0x2f0 net/core/skbuff.c:430 alloc_skb include/linux/skbuff.h:1258 [inline] nlmsg_new include/net/netlink.h:955 [inline] rtmsg_ifinfo_build_skb+0x72/0x1a0 net/core/rtnetlink.c:3904 rtmsg_ifinfo_event net/core/rtnetlink.c:3940 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3931 [inline] rtmsg_ifinfo+0x83/0x120 net/core/rtnetlink.c:3949 register_netdevice+0x12f1/0x1680 net/core/dev.c:10117 register_netdev+0x2d/0x50 net/core/dev.c:10196 teql_init+0x7d/0x22f net/sched/sch_teql.c:487 do_one_initcall+0xfe/0x650 init/main.c:1304 page_owner free stack trace missing Memory state around the buggy address: ffff888026fc9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026fca000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888026fca080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026fca100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026fca180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================