================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3c15/0x55b0 kernel/locking/lockdep.c:3664 Read of size 8 at addr ffff88809ee96e40 by task syz-executor.0/7446 CPU: 1 PID: 7446 Comm: syz-executor.0 Not tainted 5.1.0+ #1 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+0x113/0x167 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:188 __kasan_report.cold.6+0x1b/0x39 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __lock_acquire+0x3c15/0x55b0 kernel/locking/lockdep.c:3664 lock_acquire+0x173/0x3d0 kernel/locking/lockdep.c:4302 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2d/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] rhashtable_walk_enter+0xf4/0x300 lib/rhashtable.c:669 __tipc_dump_start+0x1bb/0x2c0 net/tipc/socket.c:3414 tipc_dump_start+0x6e/0x90 net/tipc/socket.c:3396 __netlink_dump_start+0x485/0x810 net/netlink/af_netlink.c:2351 netlink_dump_start include/linux/netlink.h:226 [inline] tipc_sock_diag_handler_dump+0x186/0x260 net/tipc/diag.c:91 __sock_diag_cmd net/core/sock_diag.c:232 [inline] sock_diag_rcv_msg+0x291/0x380 net/core/sock_diag.c:263 netlink_rcv_skb+0x13f/0x380 net/netlink/af_netlink.c:2486 sock_diag_rcv+0x25/0x40 net/core/sock_diag.c:274 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x444/0x640 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:660 [inline] sock_sendmsg+0xd6/0x100 net/socket.c:671 ___sys_sendmsg+0x658/0x960 net/socket.c:2292 __sys_sendmsg+0xd9/0x180 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2337 do_syscall_64+0xd6/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458da9 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fa7221dac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458da9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa7221db6d4 R13: 00000000004c6790 R14: 00000000004db3e8 R15: 00000000ffffffff Allocated by task 7342: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc.constprop.8+0xc7/0xd0 mm/kasan/common.c:489 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x154/0x750 mm/slab.c:3585 kmalloc include/linux/slab.h:547 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x18e/0x1e00 security/tomoyo/audit.c:255 tomoyo_supervisor+0x30a/0xc00 security/tomoyo/common.c:2095 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x24e/0x340 security/tomoyo/file.c:587 tomoyo_check_open_permission+0x2c6/0x2f0 security/tomoyo/file.c:777 tomoyo_file_open+0x81/0xa0 security/tomoyo/tomoyo.c:319 security_file_open+0x4c/0x250 security/security.c:1458 do_dentry_open+0x2d1/0x1000 fs/open.c:764 vfs_open+0x9a/0xc0 fs/open.c:886 do_last fs/namei.c:3416 [inline] path_openat+0xb52/0x3d10 fs/namei.c:3533 do_filp_open+0x177/0x250 fs/namei.c:3563 do_sys_open+0x1dd/0x370 fs/open.c:1069 __do_sys_openat fs/open.c:1096 [inline] __se_sys_openat fs/open.c:1090 [inline] __x64_sys_openat+0x98/0xf0 fs/open.c:1090 do_syscall_64+0xd6/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7342: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3462 [inline] kfree+0xcf/0x230 mm/slab.c:3785 tomoyo_init_log+0x12e7/0x1e00 security/tomoyo/audit.c:294 tomoyo_supervisor+0x30a/0xc00 security/tomoyo/common.c:2095 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x24e/0x340 security/tomoyo/file.c:587 tomoyo_check_open_permission+0x2c6/0x2f0 security/tomoyo/file.c:777 tomoyo_file_open+0x81/0xa0 security/tomoyo/tomoyo.c:319 security_file_open+0x4c/0x250 security/security.c:1458 do_dentry_open+0x2d1/0x1000 fs/open.c:764 vfs_open+0x9a/0xc0 fs/open.c:886 do_last fs/namei.c:3416 [inline] path_openat+0xb52/0x3d10 fs/namei.c:3533 do_filp_open+0x177/0x250 fs/namei.c:3563 do_sys_open+0x1dd/0x370 fs/open.c:1069 __do_sys_openat fs/open.c:1096 [inline] __se_sys_openat fs/open.c:1090 [inline] __x64_sys_openat+0x98/0xf0 fs/open.c:1090 do_syscall_64+0xd6/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809ee96140 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3328 bytes inside of 4096-byte region [ffff88809ee96140, ffff88809ee97140) The buggy address belongs to the page: page:ffffea00027ba580 count:1 mapcount:0 mapping:ffff8880aa400dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000267d908 ffffea000223b888 ffff8880aa400dc0 raw: 0000000000000000 ffff88809ee96140 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809ee96d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809ee96d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809ee96e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809ee96e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809ee96f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================