================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:155 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:181 Read of size 1 at addr ffff888014a35818 by task udevd/5764 CPU: 0 UID: 0 PID: 5764 Comm: udevd Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 __kasan_check_byte+0x36/0x50 mm/kasan/common.c:585 kasan_check_byte include/linux/kasan.h:402 [inline] lock_acquire kernel/locking/lockdep.c:5916 [inline] lock_acquire+0x132/0x380 kernel/locking/lockdep.c:5899 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:155 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:181 p9_tag_remove net/9p/client.c:274 [inline] p9_req_put net/9p/client.c:282 [inline] p9_req_put+0xaf/0x250 net/9p/client.c:279 req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147 vring_interrupt+0x2ef/0x660 drivers/virtio/virtio_ring.c:3335 __handle_irq_event_percpu+0x232/0x880 kernel/irq/handle.c:209 handle_irq_event_percpu kernel/irq/handle.c:246 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:263 handle_edge_irq+0x34c/0x950 kernel/irq/chip.c:859 generic_handle_irq_desc include/linux/irqdesc.h:188 [inline] handle_irq arch/x86/kernel/irq.c:209 [inline] call_irq_handler arch/x86/kernel/irq.c:265 [inline] __common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:280 common_interrupt+0x60/0xe0 arch/x86/kernel/irq.c:273 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:665 RIP: 0033:0x5629ce1a4b7f Code: 00 e8 d5 4f 00 00 48 8d bb c0 00 00 00 e8 c9 4f 00 00 48 8d bb f0 00 00 00 e8 bd 4f 00 00 48 8d bb 20 01 00 00 e8 b1 4f 00 00 <48> 8d bb 50 01 00 00 e8 a5 4f 00 00 48 8b 7b 60 e8 ac bd fd ff 48 RSP: 002b:00007ffc2d8c0c30 EFLAGS: 00000206 RAX: 0000000000000000 RBX: 00005629e60cf6d0 RCX: 0000562c84953f5a RDX: 00005629e60a8010 RSI: 0000000000000006 RDI: 0000000000000000 RBP: 00005629e60a8910 R08: 0000000000000040 R09: 0000000000000002 R10: 0000000000000000 R11: 0000000000000202 R12: 00005629e60cf6d0 R13: 00005629e60b6190 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6431: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:409 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5563 _kmalloc_noprof include/linux/slab.h:991 [inline] p9_client_create+0xaf/0xd40 net/9p/client.c:864 v9fs_session_init+0x3c/0xdd0 fs/9p/v9fs.c:471 v9fs_get_tree+0xb8/0xb50 fs/9p/vfs_super.c:97 vfs_get_tree+0x92/0x320 fs/super.c:1932 fc_mount fs/namespace.c:1278 [inline] do_new_mount_fc fs/namespace.c:3885 [inline] do_new_mount fs/namespace.c:3961 [inline] path_mount+0x7d0/0x2850 fs/namespace.c:4312 do_mount fs/namespace.c:4325 [inline] __do_sys_mount fs/namespace.c:4543 [inline] __se_sys_mount fs/namespace.c:4520 [inline] __ia32_sys_mount+0x292/0x310 fs/namespace.c:4520 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x13a/0x8b0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 6431: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:264 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6509 [inline] kfree+0x22b/0x6d0 mm/slub.c:6802 p9_client_create+0x72d/0xd40 net/9p/client.c:943 v9fs_session_init+0x3c/0xdd0 fs/9p/v9fs.c:471 v9fs_get_tree+0xb8/0xb50 fs/9p/vfs_super.c:97 vfs_get_tree+0x92/0x320 fs/super.c:1932 fc_mount fs/namespace.c:1278 [inline] do_new_mount_fc fs/namespace.c:3885 [inline] do_new_mount fs/namespace.c:3961 [inline] path_mount+0x7d0/0x2850 fs/namespace.c:4312 do_mount fs/namespace.c:4325 [inline] __do_sys_mount fs/namespace.c:4543 [inline] __se_sys_mount fs/namespace.c:4520 [inline] __ia32_sys_mount+0x292/0x310 fs/namespace.c:4520 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x13a/0x8b0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888014a35800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of freed 512-byte region [ffff888014a35800, ffff888014a35a00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14a34 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801d042c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801d042c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5756, tgid 5756 (syz-executor), ts 74131465692 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x4f4/0x6d0 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] mca_alloc net/ipv6/mcast.c:890 [inline] __ipv6_dev_mc_inc+0x2f1/0xc80 net/ipv6/mcast.c:981 ipv6_add_dev+0xb78/0x1520 net/ipv6/addrconf.c:472 ipv6_find_idev+0x192/0x1f0 net/ipv6/addrconf.c:498 inet6_rtm_newaddr+0x561/0x1bb0 net/ipv6/addrconf.c:5073 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7137 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2575 netlink_unicast_kernel net/netlink/af_netlink.c:1338 [inline] netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1364 netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:800 [inline] __sock_sendmsg net/socket.c:815 [inline] __sys_sendto+0x48b/0x4e0 net/socket.c:2281 page last free pid 5745 tgid 5745 ts 69139683351 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:361 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_noprof+0x269/0x6a0 mm/slub.c:5010 __proc_create+0x247/0x8f0 fs/proc/generic.c:457 _proc_mkdir fs/proc/generic.c:520 [inline] proc_mkdir_data fs/proc/generic.c:537 [inline] proc_mkdir+0x81/0x170 fs/proc/generic.c:551 create_cache_proc_entries net/sunrpc/cache.c:1679 [inline] cache_register_net+0x18f/0x5e0 net/sunrpc/cache.c:1716 nfsd_idmap_init+0x16e/0x250 fs/nfsd/nfs4idmap.c:482 nfsd_net_init+0x85/0x480 fs/nfsd/nfsctl.c:2758 ops_init+0x1e2/0x5f0 net/core/net_namespace.c:137 setup_net+0x118/0x3a0 net/core/net_namespace.c:443 copy_net_ns+0x345/0x7a0 net/core/net_namespace.c:582 create_new_namespaces+0x3ea/0xac0 kernel/nsproxy.c:132 unshare_nsproxy_namespaces+0xf2/0x220 kernel/nsproxy.c:234 ksys_unshare+0x4a2/0xb30 kernel/fork.c:3297 Memory state around the buggy address: ffff888014a35700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888014a35780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888014a35800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888014a35880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888014a35900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================