================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x81/0xa0 lib/list_debug.c:23 Read of size 8 at addr ffff8880366f2b40 by task syz-executor.0/8893 CPU: 1 PID: 8893 Comm: syz-executor.0 Not tainted 4.19.203-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __list_add_valid+0x81/0xa0 lib/list_debug.c:23 __list_add include/linux/list.h:60 [inline] list_add include/linux/list.h:79 [inline] chrdev_open+0x4b9/0x770 fs/char_dev.c:405 do_dentry_open+0x4aa/0x1160 fs/open.c:796 do_last fs/namei.c:3421 [inline] path_openat+0x793/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665e9 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8d517ff188 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 00000000004665e9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c038 R13: 00007ffdc86225bf R14: 00007f8d517ff300 R15: 0000000000022000 Allocated by task 8824: kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 fuse_alloc_inode+0x1d/0x3f0 fs/fuse/inode.c:87 alloc_inode+0x5d/0x180 fs/inode.c:211 iget5_locked fs/inode.c:1131 [inline] iget5_locked+0x57/0xd0 fs/inode.c:1124 fuse_iget+0x1a6/0x800 fs/fuse/inode.c:307 fuse_lookup_name+0x413/0x5c0 fs/fuse/dir.c:341 fuse_lookup+0xdf/0x410 fs/fuse/dir.c:368 fuse_atomic_open+0x20a/0x330 fs/fuse/dir.c:508 atomic_open fs/namei.c:3073 [inline] lookup_open+0x1023/0x1a20 fs/namei.c:3205 do_last fs/namei.c:3327 [inline] path_openat+0x1804/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8876: __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881 __do_softirq+0x265/0x980 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880366f27c0 which belongs to the cache fuse_inode of size 1264 The buggy address is located 896 bytes inside of 1264-byte region [ffff8880366f27c0, ffff8880366f2cb0) The buggy address belongs to the page: page:ffffea0000d9bc80 count:1 mapcount:0 mapping:ffff8880b0e4c900 index:0xffff8880366f2ffe flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0000d9d388 ffff8880b0e58c48 ffff8880b0e4c900 raw: ffff8880366f2ffe ffff8880366f2240 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880366f2a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880366f2a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880366f2b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880366f2b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880366f2c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: ff c3 inc %ebx 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 9: 00 00 00 c: 0f 1f 40 00 nopl 0x0(%rax) 10: 48 89 f8 mov %rdi,%rax 13: 48 89 f7 mov %rsi,%rdi 16: 48 89 d6 mov %rdx,%rsi 19: 48 89 ca mov %rcx,%rdx 1c: 4d 89 c2 mov %r8,%r10 1f: 4d 89 c8 mov %r9,%r8 22: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9 27: 0f 05 syscall 29: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction 2f: 73 01 jae 0x32 31: c3 retq 32: 48 c7 c1 bc ff ff ff mov $0xffffffffffffffbc,%rcx 39: f7 d8 neg %eax 3b: 64 89 01 mov %eax,%fs:(%rcx) 3e: 48 rex.W