================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:193 [inline] BUG: KASAN: use-after-free in lockdep_register_key+0x3b9/0x490 kernel/locking/lockdep.c:1023 Read of size 8 at addr ffff88808de6a398 by task syz-executor.1/10053 CPU: 0 PID: 10053 Comm: syz-executor.1 Not tainted 5.0.0+ #15 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:193 [inline] lockdep_register_key+0x3b9/0x490 kernel/locking/lockdep.c:1023 wq_init_lockdep kernel/workqueue.c:3444 [inline] alloc_workqueue+0x427/0xe70 kernel/workqueue.c:4263 ceph_osdc_init+0x54b/0x9a0 net/ceph/osd_client.c:5136 ceph_create_client net/ceph/ceph_common.c:661 [inline] ceph_create_client+0x29c/0x370 net/ceph/ceph_common.c:623 create_fs_client fs/ceph/super.c:635 [inline] ceph_mount+0x471/0x1850 fs/ceph/super.c:1063 mount_fs+0x106/0x3ff fs/super.c:1258 vfs_kern_mount.part.0+0x6f/0x410 fs/namespace.c:959 vfs_kern_mount fs/namespace.c:949 [inline] do_new_mount fs/namespace.c:2515 [inline] do_mount+0x581/0x2d30 fs/namespace.c:2847 __do_compat_sys_mount fs/compat.c:125 [inline] __se_compat_sys_mount fs/compat.c:92 [inline] __ia32_compat_sys_mount+0x664/0x790 fs/compat.c:92 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f95869 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5d910cc EFLAGS: 00000296 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 0000000020000040 RCX: 0000000020000200 RDX: 0000000020000100 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1072: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:511 kmem_cache_alloc_trace+0x151/0x760 mm/slab.c:3621 kmalloc include/linux/slab.h:545 [inline] kzalloc include/linux/slab.h:740 [inline] alloc_perf_context+0x49/0xf0 kernel/events/core.c:4069 find_get_context.isra.0+0x145/0x5c0 kernel/events/core.c:4158 __do_sys_perf_event_open+0xbfb/0x24e0 kernel/events/core.c:10853 __se_sys_perf_event_open kernel/events/core.c:10686 [inline] __ia32_sys_perf_event_open+0xbd/0x140 kernel/events/core.c:10686 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 1066: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3821 free_ctx+0x42/0x50 kernel/events/core.c:1184 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2475 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline] rcu_core+0x928/0x1390 kernel/rcu/tree.c:2769 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff88808de6a280 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 280 bytes inside of 512-byte region [ffff88808de6a280, ffff88808de6a480) The buggy address belongs to the page: page:ffffea0002379a80 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0xffff88808de6a500 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000233c708 ffffea000265dd48 ffff88812c3f0940 raw: ffff88808de6a500 ffff88808de6a000 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808de6a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808de6a300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808de6a380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808de6a400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808de6a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================