loop3: detected capacity change from 0 to 8 SQUASHFS error: lzo decompression failed, data probably corrupt SQUASHFS error: Failed to read block 0x71: -5 ================================================================== BUG: KASAN: slab-use-after-free in squashfs_page_actor_free fs/squashfs/page_actor.h:41 [inline] BUG: KASAN: slab-use-after-free in squashfs_readahead+0x210c/0x2680 fs/squashfs/file.c:626 Read of size 4 at addr ffff88801f661fc0 by task syz.3.1960/10357 CPU: 0 UID: 0 PID: 10357 Comm: syz.3.1960 Not tainted 6.11.0-rc4-next-20240822-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 squashfs_page_actor_free fs/squashfs/page_actor.h:41 [inline] squashfs_readahead+0x210c/0x2680 fs/squashfs/file.c:626 read_pages+0x17e/0x840 mm/readahead.c:160 page_cache_ra_unbounded+0x6ce/0x7f0 mm/readahead.c:273 page_cache_sync_readahead include/linux/pagemap.h:1296 [inline] filemap_get_pages+0x543/0x2330 mm/filemap.c:2529 filemap_read+0x457/0xfa0 mm/filemap.c:2628 __kernel_read+0x532/0x9f0 fs/read_write.c:434 prepare_binprm fs/exec.c:1686 [inline] search_binary_handler fs/exec.c:1735 [inline] exec_binprm fs/exec.c:1793 [inline] bprm_execve+0xa2b/0x1770 fs/exec.c:1844 do_execveat_common+0x55f/0x6f0 fs/exec.c:1951 do_execveat fs/exec.c:2036 [inline] __do_sys_execveat fs/exec.c:2110 [inline] __se_sys_execveat fs/exec.c:2104 [inline] __x64_sys_execveat+0xc4/0xe0 fs/exec.c:2104 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3d50179e79 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:00007f3d50ede038 EFLAGS: 00000246 ORIG_RAX: 0000000000000142 RAX: ffffffffffffffda RBX: 00007f3d50315f80 RCX: 00007f3d50179e79 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000004 RBP: 00007f3d501e7916 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3d50315f80 R15: 00007fff33747cf8 Allocated by task 10357: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x19c/0x2c0 mm/slub.c:4237 kmalloc_noprof include/linux/slab.h:681 [inline] squashfs_page_actor_init_special+0x64/0x440 fs/squashfs/page_actor.c:113 squashfs_readahead+0x188f/0x2680 fs/squashfs/file.c:619 read_pages+0x17e/0x840 mm/readahead.c:160 page_cache_ra_unbounded+0x6ce/0x7f0 mm/readahead.c:273 page_cache_sync_readahead include/linux/pagemap.h:1296 [inline] filemap_get_pages+0x543/0x2330 mm/filemap.c:2529 filemap_read+0x457/0xfa0 mm/filemap.c:2628 __kernel_read+0x532/0x9f0 fs/read_write.c:434 prepare_binprm fs/exec.c:1686 [inline] search_binary_handler fs/exec.c:1735 [inline] exec_binprm fs/exec.c:1793 [inline] bprm_execve+0xa2b/0x1770 fs/exec.c:1844 do_execveat_common+0x55f/0x6f0 fs/exec.c:1951 do_execveat fs/exec.c:2036 [inline] __do_sys_execveat fs/exec.c:2110 [inline] __se_sys_execveat fs/exec.c:2104 [inline] __x64_sys_execveat+0xc4/0xe0 fs/exec.c:2104 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 10357: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2299 [inline] slab_free mm/slub.c:4521 [inline] kfree+0x196/0x3e0 mm/slub.c:4669 squashfs_page_actor_free fs/squashfs/page_actor.h:39 [inline] squashfs_readahead+0x195b/0x2680 fs/squashfs/file.c:626 read_pages+0x17e/0x840 mm/readahead.c:160 page_cache_ra_unbounded+0x6ce/0x7f0 mm/readahead.c:273 page_cache_sync_readahead include/linux/pagemap.h:1296 [inline] filemap_get_pages+0x543/0x2330 mm/filemap.c:2529 filemap_read+0x457/0xfa0 mm/filemap.c:2628 __kernel_read+0x532/0x9f0 fs/read_write.c:434 prepare_binprm fs/exec.c:1686 [inline] search_binary_handler fs/exec.c:1735 [inline] exec_binprm fs/exec.c:1793 [inline] bprm_execve+0xa2b/0x1770 fs/exec.c:1844 do_execveat_common+0x55f/0x6f0 fs/exec.c:1951 do_execveat fs/exec.c:2036 [inline] __do_sys_execveat fs/exec.c:2110 [inline] __se_sys_execveat fs/exec.c:2104 [inline] __x64_sys_execveat+0xc4/0xe0 fs/exec.c:2104 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88801f661f80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 64 bytes inside of freed 96-byte region [ffff88801f661f80, ffff88801f661fe0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f661 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000000 ffff888015841280 ffffea0000922740 dead000000000004 raw: 0000000000000000 0000000000200020 00000001fdffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5278, tgid 5278 (kworker/1:4), ts 63900477910, free_ts 63836179475 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1517 prep_new_page mm/page_alloc.c:1525 [inline] get_page_from_freelist+0x3131/0x3280 mm/page_alloc.c:3476 __alloc_pages_noprof+0x29e/0x780 mm/page_alloc.c:4743 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2368 allocate_slab+0x5a/0x2f0 mm/slub.c:2531 new_slab mm/slub.c:2584 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3771 __slab_alloc+0x58/0xa0 mm/slub.c:3861 __slab_alloc_node mm/slub.c:3914 [inline] slab_alloc_node mm/slub.c:4073 [inline] __kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4232 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:817 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:547 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:752 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:856 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:889 [inline] nsim_fib_event_work+0x19c5/0x4130 drivers/net/netdevsim/fib.c:1492 process_one_work kernel/workqueue.c:3232 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3313 worker_thread+0x86d/0xd10 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5231 tgid 5231 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1098 [inline] free_unref_page+0xc07/0xd90 mm/page_alloc.c:2651 __slab_free+0x31b/0x3d0 mm/slub.c:4432 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4036 [inline] slab_alloc_node mm/slub.c:4085 [inline] __kmalloc_cache_noprof+0x132/0x2c0 mm/slub.c:4232 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:817 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:547 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:752 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:856 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:889 [inline] nsim_fib_event_work+0x19c5/0x4130 drivers/net/netdevsim/fib.c:1492 process_one_work kernel/workqueue.c:3232 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3313 worker_thread+0x86d/0xd10 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88801f661e80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff88801f661f00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88801f661f80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff88801f662000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801f662080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================