================================================================== BUG: KASAN: stack-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: stack-out-of-bounds in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: stack-out-of-bounds in xfs_buf_lock+0x9e/0x520 fs/xfs/xfs_buf.c:1194 Read of size 4 at addr ffffc90004ed7b9c by task syz-executor.1/9358 CPU: 0 PID: 9358 Comm: syz-executor.1 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] xfs_buf_lock+0x9e/0x520 fs/xfs/xfs_buf.c:1194 xfs_buf_delwri_submit_buffers+0x140/0xa40 fs/xfs/xfs_buf.c:2293 xfs_buf_delwri_submit+0x8a/0x270 fs/xfs/xfs_buf.c:2371 xfs_qm_shrink_scan+0x209/0x3f0 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x44f/0x11c0 mm/shrinker.c:435 shrink_slab+0x18a/0x1310 mm/shrinker.c:662 drop_slab_node mm/vmscan.c:393 [inline] drop_slab+0x14c/0x2c0 mm/vmscan.c:411 drop_caches_sysctl_handler+0x171/0x190 fs/drop_caches.c:68 proc_sys_call_handler+0x4cc/0x6f0 fs/proc/proc_sysctl.c:592 iter_file_splice_write+0x906/0x10b0 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x19b/0x6d0 fs/splice.c:1164 splice_direct_to_actor+0x346/0xa40 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x17e/0x250 fs/splice.c:1233 do_sendfile+0xb1e/0xe50 fs/read_write.c:1295 __do_compat_sys_sendfile fs/read_write.c:1377 [inline] __se_compat_sys_sendfile fs/read_write.c:1366 [inline] __ia32_compat_sys_sendfile+0x163/0x230 fs/read_write.c:1366 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7298579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5e8a5ac EFLAGS: 00000292 ORIG_RAX: 00000000000000bb RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 0000000000000007 RDX: 0000000020002080 RSI: 000000000000023b RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the virtual mapping at [ffffc90004ed0000, ffffc90004ed9000) created by: kernel_clone+0xfd/0x980 kernel/fork.c:2797 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805f4b4000 pfn:0x5f4b0 memcg:ffff88801279e802 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88805f4b4000 0000000000000000 00000001ffffffff ffff88801279e802 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 193610998199, free_ts 192567367971 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678 alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3566 [inline] __vmalloc_area_node mm/vmalloc.c:3642 [inline] __vmalloc_node_range_noprof+0xa6a/0x1520 mm/vmalloc.c:3823 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct kernel/fork.c:1115 [inline] copy_process+0x29f5/0x6f50 kernel/fork.c:2220 kernel_clone+0xfd/0x980 kernel/fork.c:2797 kernel_thread+0xc0/0x100 kernel/fork.c:2859 create_kthread kernel/kthread.c:412 [inline] kthreadd+0x4ef/0x7d0 kernel/kthread.c:765 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 9201 tgid 9201 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2583 vfree+0x181/0x7a0 mm/vmalloc.c:3346 vb2_vmalloc_put drivers/media/common/videobuf2/videobuf2-vmalloc.c:68 [inline] vb2_vmalloc_put+0x8e/0xd0 drivers/media/common/videobuf2/videobuf2-vmalloc.c:63 __vb2_buf_mem_free+0x154/0x2c0 drivers/media/common/videobuf2/videobuf2-core.c:276 __vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:558 [inline] __vb2_queue_free+0x861/0xac0 drivers/media/common/videobuf2/videobuf2-core.c:586 vb2_core_queue_release+0x70/0x190 drivers/media/common/videobuf2/videobuf2-core.c:2655 v4l2_m2m_ctx_release+0x1e/0x40 drivers/media/v4l2-core/v4l2-mem2mem.c:1276 vicodec_release+0xa2/0x150 drivers/media/test-drivers/vicodec/vicodec-core.c:1941 v4l2_release+0x238/0x460 drivers/media/v4l2-core/v4l2-dev.c:456 __fput+0x408/0xbb0 fs/file_table.c:422 __fput_sync+0x47/0x50 fs/file_table.c:507 __do_sys_close fs/open.c:1555 [inline] __se_sys_close fs/open.c:1540 [inline] __ia32_sys_close+0x86/0x100 fs/open.c:1540 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Memory state around the buggy address: ffffc90004ed7a80: 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90004ed7b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90004ed7b80: 00 f1 f1 f1 f1 04 f2 04 f2 00 f3 f3 f3 00 00 00 ^ ffffc90004ed7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90004ed7c80: 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 04 f3 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi