tmpfs: Unknown parameter 'm' ================================================================== BUG: KASAN: use-after-free in get_disk_and_module block/genhd.c:1787 [inline] BUG: KASAN: use-after-free in exact_lock+0x38/0xd0 block/genhd.c:677 Read of size 8 at addr ffff8881095cf460 by task syz.0.1185/5327 CPU: 0 PID: 5327 Comm: syz.0.1185 Tainted: G W 5.10.234-syzkaller-00023-g3f5f2283d684 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 get_disk_and_module block/genhd.c:1787 [inline] exact_lock+0x38/0xd0 block/genhd.c:677 kobj_lookup+0x294/0x430 drivers/base/map.c:119 get_gendisk+0xf7/0x3d0 block/genhd.c:1001 bdev_get_gendisk fs/block_dev.c:1110 [inline] __blkdev_get+0x18c/0x12f0 fs/block_dev.c:1474 blkdev_get fs/block_dev.c:1653 [inline] blkdev_open+0x241/0x480 fs/block_dev.c:1770 do_dentry_open+0x7c1/0x10d0 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:942 do_open fs/namei.c:3391 [inline] path_openat+0x2660/0x3000 fs/namei.c:3509 do_filp_open+0x21c/0x460 fs/namei.c:3536 do_sys_openat2+0x13f/0x710 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1244 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fab01c6f169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fab002d9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fab01e87fa0 RCX: 00007fab01c6f169 RDX: 0000000000101000 RSI: 0000400000000000 RDI: ffffffffffffff9c RBP: 00007fab01cf02a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fab01e87fa0 R15: 00007ffef1935d48 Allocated by task 2045: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] __kmalloc+0x1aa/0x330 mm/slub.c:4033 __kmalloc_node include/linux/slab.h:418 [inline] kmalloc_node include/linux/slab.h:575 [inline] kvmalloc_node+0x82/0x130 mm/util.c:612 kvmalloc include/linux/mm.h:822 [inline] kvmalloc_array include/linux/mm.h:840 [inline] alloc_fdtable+0xcf/0x260 fs/file.c:132 dup_fd+0x7af/0xb30 fs/file.c:350 copy_files+0xe6/0x200 kernel/fork.c:1541 copy_process+0x10ac/0x3340 kernel/fork.c:2171 kernel_clone+0x21e/0x9e0 kernel/fork.c:2574 __do_sys_clone kernel/fork.c:2700 [inline] __se_sys_clone kernel/fork.c:2684 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2684 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 4858: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kfree+0xc3/0x270 mm/slub.c:4191 kvfree+0x35/0x40 mm/util.c:647 __free_fdtable fs/file.c:36 [inline] put_files_struct+0x27f/0x320 fs/file.c:460 exit_files+0x80/0xa0 fs/file.c:485 do_exit+0xc4d/0x2a50 kernel/exit.c:858 do_group_exit+0x141/0x310 kernel/exit.c:985 get_signal+0x10a0/0x1410 kernel/signal.c:2793 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff8881095cf000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1120 bytes inside of 2048-byte region [ffff8881095cf000, ffff8881095cf800) The buggy address belongs to the page: page:ffffea0004257200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1095c8 head:ffffea0004257200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 ffffea0004d78600 0000000200000002 ffff888100042d80 raw: 0000000000000000 0000000000080008 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 1, ts 1926645802, free_ts 0 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc_trace+0x1bd/0x2e0 mm/slub.c:2972 kmem_cache_alloc_node_trace include/linux/slab.h:440 [inline] kmalloc_node include/linux/slab.h:570 [inline] kzalloc_node include/linux/slab.h:675 [inline] bdi_alloc+0x4e/0x110 mm/backing-dev.c:746 blk_alloc_queue+0x112/0x640 block/blk-core.c:535 blk_mq_init_queue_data block/blk-mq.c:3155 [inline] blk_mq_init_queue+0x36/0xd0 block/blk-mq.c:3174 loop_add+0x265/0x750 drivers/block/loop.c:2140 loop_init+0x225/0x263 drivers/block/loop.c:2403 do_one_initcall+0x189/0x620 init/main.c:1197 do_initcall_level+0x186/0x304 init/main.c:1270 do_initcalls+0x4e/0x8e init/main.c:1286 do_basic_setup+0x88/0x91 init/main.c:1306 page_owner free stack trace missing Memory state around the buggy address: ffff8881095cf300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881095cf380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881095cf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881095cf480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881095cf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================