================================================================== BUG: KASAN: use-after-free in get_link fs/namei.c:1118 [inline] BUG: KASAN: use-after-free in link_path_walk+0x10a2/0x1110 fs/namei.c:2174 Read of size 1 at addr ffff8881d14ee6c0 by task syz-executor.3/8358 CPU: 0 PID: 8358 Comm: syz-executor.3 Not tainted 4.14.99+ #12 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x10e lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0x88/0x2a5 mm/kasan/report.c:393 Allocated by task 8357: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] __kmalloc_track_caller+0xf1/0x310 mm/slub.c:4288 kstrdup+0x36/0x70 mm/util.c:56 bpf_symlink+0x22/0x110 kernel/bpf/inode.c:200 vfs_symlink2+0x32a/0x560 fs/namei.c:4208 SYSC_symlinkat fs/namei.c:4241 [inline] SyS_symlinkat+0x116/0x1e0 fs/namei.c:4221 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 Freed by task 8357: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kfree+0xf5/0x310 mm/slub.c:3897 bpf_evict_inode+0x102/0x130 kernel/bpf/inode.c:381 evict+0x2cb/0x5f0 fs/inode.c:554 iput_final fs/inode.c:1516 [inline] iput fs/inode.c:1543 [inline] iput+0x36f/0x8d0 fs/inode.c:1528 do_unlinkat+0x376/0x5e0 fs/namei.c:4150 SYSC_unlinkat fs/namei.c:4186 [inline] SyS_unlinkat+0x33/0x70 fs/namei.c:4178 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 The buggy address belongs to the object at ffff8881d14ee6c0 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [ffff8881d14ee6c0, ffff8881d14ee6d0) The buggy address belongs to the page: page:ffffea0007453b80 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 0000000000000000 0000000180800080 raw: ffffea0007292840 0000000600000006 ffff8881da803a00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d14ee580: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff8881d14ee600: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc >ffff8881d14ee680: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ^ ffff8881d14ee700: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff8881d14ee780: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ==================================================================