================================================================== BUG: KASAN: use-after-free in __list_add_valid+0x36/0xc0 lib/list_debug.c:23 Read of size 8 at addr ffff88818b948600 by task syz-executor.4/11881 CPU: 1 PID: 11881 Comm: syz-executor.4 Not tainted 5.4.72-syzkaller-00299-gb34934d40c49 #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+0x1b0/0x21e lib/dump_stack.c:118 print_address_description+0x96/0x5d0 mm/kasan/report.c:374 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506 kasan_report+0x27/0x50 mm/kasan/common.c:634 __list_add_valid+0x36/0xc0 lib/list_debug.c:23 __list_add include/linux/list.h:60 [inline] list_add include/linux/list.h:79 [inline] chrdev_open+0x292/0x670 fs/char_dev.c:396 do_dentry_open+0x8fa/0x1070 fs/open.c:797 do_last fs/namei.c:3495 [inline] path_openat+0x165b/0x4270 fs/namei.c:3612 do_filp_open+0x1f7/0x430 fs/namei.c:3642 do_sys_open+0x343/0x620 fs/open.c:1094 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45de59 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f16b632cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000022a40 RCX: 000000000045de59 RDX: 0000000000000000 RSI: 0000000020002000 RDI: ffffffffffffff9c RBP: 000000000118c010 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4 R13: 00007ffe58460eff R14: 00007f16b632d9c0 R15: 000000000118bfd4 Allocated by task 11820: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x117/0x1b0 mm/kasan/common.c:510 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2803 [inline] slab_alloc mm/slub.c:2811 [inline] kmem_cache_alloc+0x1d5/0x250 mm/slub.c:2816 fuse_alloc_inode+0x20/0x1f0 fs/fuse/inode.c:76 alloc_inode fs/inode.c:232 [inline] iget5_locked+0xa2/0x3e0 fs/inode.c:1148 fuse_iget+0xf0/0x850 fs/fuse/inode.c:296 fuse_lookup_name+0x63e/0x7e0 fs/fuse/dir.c:363 fuse_lookup+0xfb/0x4d0 fs/fuse/dir.c:390 fuse_atomic_open+0x149/0x1470 fs/fuse/dir.c:533 atomic_open fs/namei.c:3147 [inline] lookup_open fs/namei.c:3279 [inline] do_last fs/namei.c:3401 [inline] path_openat+0x2028/0x4270 fs/namei.c:3612 do_filp_open+0x1f7/0x430 fs/namei.c:3642 do_sys_open+0x343/0x620 fs/open.c:1094 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 9: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x168/0x220 mm/kasan/common.c:471 slab_free_hook mm/slub.c:1453 [inline] slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1486 slab_free mm/slub.c:3051 [inline] kmem_cache_free+0xac/0x5c0 mm/slub.c:3067 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0xb30/0x1270 kernel/rcu/tree.c:2378 __do_softirq+0x22e/0x569 kernel/softirq.c:292 The buggy address belongs to the object at ffff88818b9483c0 which belongs to the cache fuse_inode of size 832 The buggy address is located 576 bytes inside of 832-byte region [ffff88818b9483c0, ffff88818b948700) The buggy address belongs to the page: page:ffffea00062e5200 refcount:1 mapcount:0 mapping:ffff8881d92b4000 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea00064a4d00 0000000400000004 ffff8881d92b4000 raw: 0000000000000000 0000000080110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88818b948500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88818b948580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88818b948600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88818b948680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88818b948700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================