================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x78/0x1f80 kernel/locking/lockdep.c:4899 Read of size 8 at addr ffff888024ac5130 by task syz-executor.4/1440 CPU: 0 PID: 1440 Comm: syz-executor.4 Not tainted 5.18.0-rc2-syzkaller-00050-ga19944809fe9 #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+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:313 print_report+0xf4/0x210 mm/kasan/report.c:429 kasan_report+0xfb/0x130 mm/kasan/report.c:491 __lock_acquire+0x78/0x1f80 kernel/locking/lockdep.c:4899 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5641 lock_sock_nested+0x44/0xf0 net/core/sock.c:3312 lock_sock include/net/sock.h:1682 [inline] nr_recvmsg+0xee/0x540 net/netrom/af_netrom.c:1155 ____sys_recvmsg+0x285/0x530 ___sys_recvmsg net/socket.c:2674 [inline] do_recvmmsg+0xa2e/0x15a0 net/socket.c:2768 __sys_recvmmsg net/socket.c:2847 [inline] __do_sys_recvmmsg net/socket.c:2870 [inline] __se_sys_recvmmsg net/socket.c:2863 [inline] __x64_sys_recvmmsg+0x195/0x240 net/socket.c:2863 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+0x44/0xae RIP: 0033:0x7f75fda89049 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:00007f75feb77168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f75fdb9c1d0 RCX: 00007f75fda89049 RDX: 00000000000005dd RSI: 0000000020000540 RDI: 0000000000000004 RBP: 00007f75fdae308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000040012062 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff1ed70a7f R14: 00007f75feb77300 R15: 0000000000022000 Allocated by task 1417: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:234 [inline] __kmalloc+0x223/0x370 mm/slub.c:4414 kmalloc include/linux/slab.h:586 [inline] sk_prot_alloc+0xde/0x200 net/core/sock.c:1936 sk_alloc+0x36/0x340 net/core/sock.c:1989 nr_create+0x9d/0x4f0 net/netrom/af_netrom.c:433 __sock_create+0x3fd/0x850 net/socket.c:1468 sock_create net/socket.c:1519 [inline] __sys_socket+0x133/0x370 net/socket.c:1561 __do_sys_socket net/socket.c:1570 [inline] __se_sys_socket net/socket.c:1568 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1568 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+0x44/0xae Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:348 call_rcu+0x163/0x9c0 kernel/rcu/tree.c:3074 netlink_release+0x1310/0x1730 net/netlink/af_netlink.c:815 __sock_release net/socket.c:650 [inline] sock_release+0x7a/0x140 net/socket.c:678 diag_net_exit+0x3c/0x60 net/core/sock_diag.c:325 ops_exit_list net/core/net_namespace.c:162 [inline] cleanup_net+0x758/0xc50 net/core/net_namespace.c:594 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:348 call_rcu+0x163/0x9c0 kernel/rcu/tree.c:3074 in6_dev_put include/net/addrconf.h:380 [inline] addrconf_ifdown+0x1799/0x1a00 net/ipv6/addrconf.c:3888 addrconf_notify+0x403/0xf80 notifier_call_chain kernel/notifier.c:84 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:392 call_netdevice_notifiers_info net/core/dev.c:1938 [inline] call_netdevice_notifiers_extack net/core/dev.c:1976 [inline] call_netdevice_notifiers net/core/dev.c:1990 [inline] unregister_netdevice_many+0xeee/0x1950 net/core/dev.c:10751 ip6_tnl_exit_batch_net+0x5ad/0x5f0 net/ipv6/ip6_tunnel.c:2319 ops_exit_list net/core/net_namespace.c:167 [inline] cleanup_net+0x80c/0xc50 net/core/net_namespace.c:594 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff888024ac5000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 304 bytes inside of 2048-byte region [ffff888024ac5000, ffff888024ac5800) The buggy address belongs to the physical page: page:ffffea000092b000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888024ac5000 pfn:0x24ac0 head:ffffea000092b000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001f9ae00 dead000000000002 ffff888011042000 raw: ffff888024ac5000 0000000080080007 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 9576831113, free_ts 0 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0x72e/0x7a0 mm/page_alloc.c:4182 __alloc_pages+0x26c/0x5f0 mm/page_alloc.c:5408 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2104 alloc_slab_page+0x70/0xf0 mm/slub.c:1799 allocate_slab+0x5e/0x560 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x41e/0xcd0 mm/slub.c:3005 __slab_alloc mm/slub.c:3092 [inline] slab_alloc_node mm/slub.c:3183 [inline] slab_alloc mm/slub.c:3225 [inline] __kmalloc_track_caller+0x2a9/0x350 mm/slub.c:4916 kmemdup+0x21/0x50 mm/util.c:128 neigh_sysctl_register+0xb0/0x4f0 net/core/neighbour.c:3731 devinet_sysctl_register+0x9d/0x1a0 net/ipv4/devinet.c:2625 inetdev_init+0x28f/0x4c0 net/ipv4/devinet.c:279 inetdev_event+0x282/0x1400 net/ipv4/devinet.c:1536 notifier_call_chain kernel/notifier.c:84 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:392 call_netdevice_notifiers_info net/core/dev.c:1938 [inline] call_netdevice_notifiers_extack net/core/dev.c:1976 [inline] call_netdevice_notifiers+0x14e/0x1d0 net/core/dev.c:1990 register_netdevice+0x158f/0x19a0 net/core/dev.c:9994 register_netdev+0x37/0x50 net/core/dev.c:10087 page_owner free stack trace missing Memory state around the buggy address: ffff888024ac5000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888024ac5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888024ac5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888024ac5180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888024ac5200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================