================================================================== BUG: KASAN: use-after-free in constant_test_bit arch/x86/include/asm/bitops.h:328 [inline] BUG: KASAN: use-after-free in fuse_dev_do_read.isra.24+0x166f/0x1be0 fs/fuse/dev.c:1305 Read of size 8 at addr ffff8801cec98430 by task syz-executor0/9001 CPU: 1 PID: 9001 Comm: syz-executor0 Not tainted 4.16.0-rc6+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x153/0x201 lib/dump_stack.c:53 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 constant_test_bit arch/x86/include/asm/bitops.h:328 [inline] fuse_dev_do_read.isra.24+0x166f/0x1be0 fs/fuse/dev.c:1305 fuse_dev_read+0x185/0x240 fs/fuse/dev.c:1347 call_read_iter include/linux/fs.h:1776 [inline] new_sync_read fs/read_write.c:401 [inline] __vfs_read+0x54a/0xd20 fs/read_write.c:413 vfs_read+0xf5/0x300 fs/read_write.c:447 SYSC_read fs/read_write.c:573 [inline] SyS_read+0xf5/0x250 fs/read_write.c:566 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] do_fast_syscall_32+0x3d5/0x1016 arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f8fcb9 RSP: 002b:00000000f7f8b0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020001000 RDX: 00000000ffffff20 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 9010: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:552 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x790 mm/slab.c:3541 __fuse_request_alloc+0x23/0xc0 fs/fuse/dev.c:58 fuse_request_alloc fs/fuse/dev.c:86 [inline] __fuse_get_req+0x186/0x8d0 fs/fuse/dev.c:151 fuse_get_req fs/fuse/dev.c:181 [inline] fuse_simple_request+0x20/0x610 fs/fuse/dev.c:536 fuse_do_setattr+0x820/0x1f60 fs/fuse/dir.c:1680 fuse_setattr+0x1a6/0x470 fs/fuse/dir.c:1780 notify_change+0x779/0xda0 fs/attr.c:313 utimes_common.isra.1+0x3f8/0x7f0 fs/utimes.c:91 do_utimes+0x199/0x250 fs/utimes.c:156 C_SYSC_futimesat fs/utimes.c:272 [inline] compat_SyS_futimesat fs/utimes.c:256 [inline] C_SYSC_utimes fs/utimes.c:277 [inline] compat_SyS_utimes+0x1f8/0x2e0 fs/utimes.c:275 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] do_fast_syscall_32+0x3d5/0x1016 arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 9010: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kmem_cache_free+0x83/0x2d0 mm/slab.c:3743 fuse_request_free+0x77/0x90 fs/fuse/dev.c:101 fuse_put_request+0x22a/0x2d0 fs/fuse/dev.c:291 fuse_simple_request+0x38a/0x610 fs/fuse/dev.c:558 fuse_do_setattr+0x820/0x1f60 fs/fuse/dir.c:1680 fuse_setattr+0x1a6/0x470 fs/fuse/dir.c:1780 notify_change+0x779/0xda0 fs/attr.c:313 utimes_common.isra.1+0x3f8/0x7f0 fs/utimes.c:91 do_utimes+0x199/0x250 fs/utimes.c:156 C_SYSC_futimesat fs/utimes.c:272 [inline] compat_SyS_futimesat fs/utimes.c:256 [inline] C_SYSC_utimes fs/utimes.c:277 [inline] compat_SyS_utimes+0x1f8/0x2e0 fs/utimes.c:275 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] do_fast_syscall_32+0x3d5/0x1016 arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff8801cec98400 which belongs to the cache fuse_request of size 448 The buggy address is located 48 bytes inside of 448-byte region [ffff8801cec98400, ffff8801cec985c0) The buggy address belongs to the page: page:ffffea00073b2600 count:1 mapcount:0 mapping:ffff8801cec98000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cec98000 0000000000000000 0000000100000008 raw: ffffea0007656660 ffffea00076359e0 ffff8801d4de8680 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cec98300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cec98380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801cec98400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cec98480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cec98500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================