================================================================== BUG: KASAN: use-after-free in iput_final fs/inode.c:1485 [inline] BUG: KASAN: use-after-free in iput fs/inode.c:1543 [inline] BUG: KASAN: use-after-free in iput+0x89d/0x900 fs/inode.c:1528 Read of size 8 at addr ffff8801cff20030 by task syz-executor1/12011 CPU: 1 PID: 12011 Comm: syz-executor1 Not tainted 4.9.154+ #24 ffff8801c67d78d8 ffffffff81b47411 0000000000000000 ffffea00073fc800 ffff8801cff20030 0000000000000008 ffffffff8156622d ffff8801c67d7910 ffffffff81502615 0000000000000000 ffff8801cff20030 ffff8801cff20030 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_address_description+0x6f/0x238 mm/kasan/report.c:256 [] kasan_report_error mm/kasan/report.c:355 [inline] [] kasan_report mm/kasan/report.c:412 [inline] [] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:397 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 [] iput_final fs/inode.c:1485 [inline] [] iput fs/inode.c:1543 [inline] [] iput+0x89d/0x900 fs/inode.c:1528 [] drop_futex_key_refs.isra.0+0x84/0xd0 kernel/futex.c:471 [] unqueue_me kernel/futex.c:2145 [inline] [] futex_wait+0x26d/0x5d0 kernel/futex.c:2492 [] do_futex+0x159/0x1a70 kernel/futex.c:3270 [] SYSC_futex kernel/futex.c:3330 [inline] [] SyS_futex+0x253/0x360 kernel/futex.c:3298 [] do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Allocated by task 5816: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack mm/kasan/kasan.c:505 [inline] set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:609 kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:594 kmem_cache_alloc_trace+0x115/0x2d0 mm/slub.c:2742 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:636 [inline] uevent_show+0x15e/0x350 drivers/base/core.c:397 dev_attr_show+0x56/0xc0 drivers/base/core.c:121 sysfs_kf_seq_show+0x219/0x3a0 fs/sysfs/file.c:63 kernfs_seq_show+0x125/0x180 fs/kernfs/file.c:168 seq_read+0x4cd/0x1250 fs/seq_file.c:240 kernfs_fop_read+0xda/0x520 fs/kernfs/file.c:252 __vfs_read+0x116/0x550 fs/read_write.c:449 vfs_read+0x137/0x380 fs/read_write.c:472 SYSC_read fs/read_write.c:588 [inline] SyS_read+0xdc/0x1c0 fs/read_write.c:581 do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb Freed by task 5816: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack mm/kasan/kasan.c:505 [inline] set_track mm/kasan/kasan.c:517 [inline] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:582 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xfb/0x310 mm/slub.c:3878 uevent_show+0x298/0x350 drivers/base/core.c:410 dev_attr_show+0x56/0xc0 drivers/base/core.c:121 sysfs_kf_seq_show+0x219/0x3a0 fs/sysfs/file.c:63 kernfs_seq_show+0x125/0x180 fs/kernfs/file.c:168 seq_read+0x4cd/0x1250 fs/seq_file.c:240 kernfs_fop_read+0xda/0x520 fs/kernfs/file.c:252 __vfs_read+0x116/0x550 fs/read_write.c:449 vfs_read+0x137/0x380 fs/read_write.c:472 SYSC_read fs/read_write.c:588 [inline] SyS_read+0xdc/0x1c0 fs/read_write.c:581 do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb The buggy address belongs to the object at ffff8801cff20000 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 48 bytes inside of 4096-byte region [ffff8801cff20000, ffff8801cff21000) The buggy address belongs to the page: page:ffffea00073fc800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000004080(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cff1ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cff1ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cff20000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cff20080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cff20100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================