================================================================== BUG: KASAN: double-free or invalid-free in slab_free mm/slub.c:3142 [inline] BUG: KASAN: double-free or invalid-free in kfree+0xdb/0x360 mm/slub.c:4124 CPU: 1 PID: 18 Comm: ksoftirqd/1 Not tainted 5.11.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 kasan_report_invalid_free+0x51/0x80 mm/kasan/report.c:355 ____kasan_slab_free+0xfd/0x110 mm/kasan/common.c:341 kasan_slab_free include/linux/kasan.h:188 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x360 mm/slub.c:4124 bdev_free_inode+0x57/0x80 fs/block_dev.c:787 i_callback+0x3f/0x70 fs/inode.c:222 rcu_do_batch kernel/rcu/tree.c:2489 [inline] rcu_core+0x5eb/0xf00 kernel/rcu/tree.c:2723 __do_softirq+0x2a5/0x9f7 kernel/softirq.c:343 run_ksoftirqd kernel/softirq.c:650 [inline] run_ksoftirqd+0x2d/0x50 kernel/softirq.c:642 smpboot_thread_fn+0x655/0x9e0 kernel/smpboot.c:165 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Allocated by task 24022: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kmalloc include/linux/slab.h:552 [inline] kernfs_get_open_node fs/kernfs/file.c:571 [inline] kernfs_fop_open+0x957/0xd40 fs/kernfs/file.c:717 do_dentry_open+0x4b9/0x11b0 fs/open.c:817 do_open fs/namei.c:3254 [inline] path_openat+0x1b9a/0x2730 fs/namei.c:3371 do_filp_open+0x17e/0x3c0 fs/namei.c:3398 do_sys_openat2+0x16d/0x420 fs/open.c:1172 do_sys_open fs/open.c:1188 [inline] __do_sys_open fs/open.c:1196 [inline] __se_sys_open fs/open.c:1192 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1192 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 24022: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:356 ____kasan_slab_free+0xe1/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:188 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x360 mm/slub.c:4124 kernfs_fop_release+0xe3/0x190 fs/kernfs/file.c:779 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88802f1d0100 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff88802f1d0100, ffff88802f1d0180) The buggy address belongs to the page: page:00000000b22b9637 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f1d0 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea0000b034c0 0000000800000008 ffff888010041640 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802f1d0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802f1d0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802f1d0100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802f1d0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802f1d0200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================