================================================================== 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 ffff888091cfe118 by task syz-executor.1/14203 CPU: 0 PID: 14203 Comm: syz-executor.1 Not tainted 5.0.0+ #9 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:135 __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:3347 [inline] alloc_workqueue+0x428/0xe70 kernel/workqueue.c:4166 xfs_init_mount_workqueues+0x20c/0x660 fs/xfs/xfs_super.c:856 xfs_fs_fill_super+0x719/0x14f0 fs/xfs/xfs_super.c:1651 mount_bdev+0x307/0x3c0 fs/super.c:1159 xfs_fs_mount+0x35/0x40 fs/xfs/xfs_super.c:1820 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:2513 [inline] do_mount+0x581/0x2d30 fs/namespace.c:2845 ksys_mount+0xdb/0x150 fs/namespace.c:3061 __do_sys_mount fs/namespace.c:3075 [inline] __se_sys_mount fs/namespace.c:3072 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3072 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a99a Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 2d 8e fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 0a 8e fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007fd2ea6faa88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd2ea6fab30 RCX: 000000000045a99a RDX: 00007fd2ea6faad0 RSI: 0000000020000200 RDI: 00007fd2ea6faaf0 RBP: 0000000020000200 R08: 00007fd2ea6fab30 R09: 00007fd2ea6faad0 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000003 R13: 0000000000000000 R14: 00000000004dbee0 R15: 00000000ffffffff Allocated by task 12998: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:468 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:509 __do_kmalloc mm/slab.c:3716 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3725 kmalloc include/linux/slab.h:550 [inline] kzalloc include/linux/slab.h:740 [inline] alloc_workqueue+0x13d/0xe70 kernel/workqueue.c:4139 ucma_open+0x76/0x290 drivers/infiniband/core/ucma.c:1725 misc_open+0x398/0x4c0 drivers/char/misc.c:141 chrdev_open+0x247/0x6b0 fs/char_dev.c:417 do_dentry_open+0x488/0x1160 fs/open.c:771 vfs_open+0xa0/0xd0 fs/open.c:880 do_last fs/namei.c:3418 [inline] path_openat+0x10e9/0x46e0 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x5d0 fs/open.c:1063 __do_sys_openat fs/open.c:1090 [inline] __se_sys_openat fs/open.c:1084 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1084 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 12998: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:457 kasan_slab_free+0xe/0x10 mm/kasan/common.c:465 __cache_free mm/slab.c:3494 [inline] kfree+0xcf/0x230 mm/slab.c:3811 alloc_workqueue+0xc3f/0xe70 kernel/workqueue.c:4198 ucma_open+0x76/0x290 drivers/infiniband/core/ucma.c:1725 misc_open+0x398/0x4c0 drivers/char/misc.c:141 chrdev_open+0x247/0x6b0 fs/char_dev.c:417 do_dentry_open+0x488/0x1160 fs/open.c:771 vfs_open+0xa0/0xd0 fs/open.c:880 do_last fs/namei.c:3418 [inline] path_openat+0x10e9/0x46e0 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x5d0 fs/open.c:1063 __do_sys_openat fs/open.c:1090 [inline] __se_sys_openat fs/open.c:1084 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1084 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888091cfe000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 280 bytes inside of 512-byte region [ffff888091cfe000, ffff888091cfe200) The buggy address belongs to the page: page:ffffea0002473f80 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0xffff888091cfea00 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00024865c8 ffffea0002481088 ffff88812c3f0940 raw: ffff888091cfea00 ffff888091cfe000 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091cfe000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091cfe080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888091cfe100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091cfe180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091cfe200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================