================================================================== BUG: KASAN: double-free in slab_free mm/slub.c:3787 [inline] BUG: KASAN: double-free in __kmem_cache_free+0xaf/0x3b0 mm/slub.c:3800 Free of addr ffff888075850000 by task syz-executor409/5056 CPU: 0 PID: 5056 Comm: syz-executor409 Not tainted 6.1.0-syzkaller-13031-g77856d911a8c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report_invalid_free+0x9b/0x1b0 mm/kasan/report.c:482 ____kasan_slab_free+0x185/0x1c0 mm/kasan/common.c:225 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x3b0 mm/slub.c:3800 diUnmount+0xf1/0x130 fs/jfs/jfs_imap.c:195 jfs_umount+0x189/0x410 fs/jfs/jfs_umount.c:63 jfs_put_super+0x85/0x1a0 fs/jfs/super.c:194 generic_shutdown_super+0x158/0x410 fs/super.c:492 kill_block_super+0x9b/0xf0 fs/super.c:1386 deactivate_locked_super+0x98/0x160 fs/super.c:332 deactivate_super+0xb1/0xd0 fs/super.c:363 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1291 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f663d676d97 Code: 07 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc8bae8cb8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f663d676d97 RDX: 00007ffc8bae8d79 RSI: 000000000000000a RDI: 00007ffc8bae8d70 RBP: 00007ffc8bae8d70 R08: 00000000ffffffff R09: 00007ffc8bae8b50 R10: 0000555556b1e653 R11: 0000000000000206 R12: 00007ffc8bae9df0 R13: 0000555556b1e5f0 R14: 00007ffc8bae8ce0 R15: 0000000000000006 Allocated by task 4418: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:580 [inline] syslog_print+0xc7/0x580 kernel/printk/printk.c:1583 do_syslog.part.0+0x246/0x630 kernel/printk/printk.c:1762 do_syslog kernel/printk/printk.c:1852 [inline] __do_sys_syslog kernel/printk/printk.c:1854 [inline] __se_sys_syslog kernel/printk/printk.c:1852 [inline] __x64_sys_syslog+0x9b/0xd0 kernel/printk/printk.c:1852 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 4418: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:518 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x3b0 mm/slub.c:3800 syslog_print+0x269/0x580 kernel/printk/printk.c:1675 do_syslog.part.0+0x246/0x630 kernel/printk/printk.c:1762 do_syslog kernel/printk/printk.c:1852 [inline] __do_sys_syslog kernel/printk/printk.c:1854 [inline] __se_sys_syslog kernel/printk/printk.c:1852 [inline] __x64_sys_syslog+0x9b/0xd0 kernel/printk/printk.c:1852 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888075850000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff888075850000, ffff888075850400) The buggy address belongs to the physical page: page:ffffea0001d61400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75850 head:ffffea0001d61400 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012041dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4418, tgid 4418 (klogd), ts 54733450219, free_ts 54446717825 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1a4/0x430 mm/slub.c:3491 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] syslog_print+0xc7/0x580 kernel/printk/printk.c:1583 do_syslog.part.0+0x246/0x630 kernel/printk/printk.c:1762 do_syslog kernel/printk/printk.c:1852 [inline] __do_sys_syslog kernel/printk/printk.c:1854 [inline] __se_sys_syslog kernel/printk/printk.c:1852 [inline] __x64_sys_syslog+0x9b/0xd0 kernel/printk/printk.c:1852 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3464 diUnmount+0xf1/0x130 fs/jfs/jfs_imap.c:195 jfs_mount_rw+0x215/0x690 fs/jfs/jfs_mount.c:239 jfs_remount+0x520/0x650 fs/jfs/super.c:454 legacy_reconfigure+0x119/0x180 fs/fs_context.c:633 reconfigure_super+0x40c/0xa30 fs/super.c:935 do_remount fs/namespace.c:2807 [inline] path_mount+0x1830/0x1e20 fs/namespace.c:3467 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807584ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807584ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888075850000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888075850080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888075850100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================