syzbot


KASAN: stack-out-of-bounds Write in fixup_umip_exception

Status: moderation: reported on 2025/01/20 12:52
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+4da6060bc1d743ea2779@syzkaller.appspotmail.com
First crash: 63d, last: 18d

Sample crash report:
loop0: detected capacity change from 0 to 4096
=======================================================
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
ntfs3(loop0): Different NTFS sector size (1024) and media sector size (512).
ntfs3(loop0): Failed to load $Extend (-22).
ntfs3(loop0): Failed to initialize $Extend.
overlayfs: upper fs does not support tmpfile.
overlayfs: upper fs does not support RENAME_WHITEOUT.
UDPLite6: UDP-Lite is deprecated and scheduled to be removed in 2025, please contact the netdev mailing list
==================================================================
BUG: KASAN: stack-out-of-bounds in fixup_umip_exception+0xe2/0xa90 arch/x86/kernel/umip.c:344
Write of size 112 at addr ffffc9000d3afd30 by task syz.0.0/5319

CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.14.0-rc4-syzkaller-00248-g03d38806a902 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __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:408 [inline]
 print_report+0x16e/0x5b0 mm/kasan/report.c:521
 kasan_report+0x143/0x180 mm/kasan/report.c:634
 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
 __asan_memset+0x23/0x50 mm/kasan/shadow.c:84
 fixup_umip_exception+0xe2/0xa90 arch/x86/kernel/umip.c:344
 __exc_general_protection arch/x86/kernel/traps.c:705 [inline]
 exc_general_protection+0x122/0x5d0 arch/x86/kernel/traps.c:693
 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617
WARNING: stack going in the wrong direction? at asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617
 </TASK>

The buggy address belongs to stack of task syz.0.0/5319
 and is located at offset 176 in frame:
 fixup_umip_exception+0x0/0xa90

This frame has 6 objects:
 [32, 40) 'dummy_base_addr.i'
 [64, 66) 'dummy_limit.i'
 [80, 88) 'dummy_value.i'
 [112, 122) 'dummy_data'
 [144, 159) 'buf'
 [176, 288) 'insn'

The buggy address belongs to the virtual mapping at
 [ffffc9000d3a8000, ffffc9000d3b1000) created by:
 copy_process+0x5d1/0x3cf0 kernel/fork.c:2233

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888043a7a7c0 pfn:0x43a7a
memcg:ffff888030f16602
flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff888043a7a7c0 0000000000000000 00000001ffffffff ffff888030f16602
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 1035, tgid 1035 (kworker/u4:6), ts 66646845643, free_ts 66639342019
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551
 prep_new_page mm/page_alloc.c:1559 [inline]
 get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477
 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739
 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270
 alloc_frozen_pages_noprof mm/mempolicy.c:2341 [inline]
 alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2361
 vm_area_alloc_pages mm/vmalloc.c:3591 [inline]
 __vmalloc_area_node mm/vmalloc.c:3669 [inline]
 __vmalloc_node_range_noprof+0x9c6/0x1380 mm/vmalloc.c:3846
 alloc_thread_stack_node kernel/fork.c:314 [inline]
 dup_task_struct+0x444/0x8c0 kernel/fork.c:1127
 copy_process+0x5d1/0x3cf0 kernel/fork.c:2233
 kernel_clone+0x226/0x8e0 kernel/fork.c:2815
 user_mode_thread+0x144/0x1c0 kernel/fork.c:2893
 call_usermodehelper_exec_sync kernel/umh.c:132 [inline]
 call_usermodehelper_exec_work+0x9b/0x230 kernel/umh.c:163
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319
 worker_thread+0x870/0xd30 kernel/workqueue.c:3400
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
page last free pid 5313 tgid 5313 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1127 [inline]
 free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660
 __slab_free+0x2c2/0x380 mm/slub.c:4520
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x9a/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:4115 [inline]
 slab_alloc_node mm/slub.c:4164 [inline]
 kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4171
 getname_flags+0xb7/0x540 fs/namei.c:139
 getname_maybe_null include/linux/fs.h:2860 [inline]
 vfs_fstatat+0x41/0x150 fs/stat.c:363
 __do_sys_newfstatat fs/stat.c:532 [inline]
 __se_sys_newfstatat fs/stat.c:526 [inline]
 __x64_sys_newfstatat+0x11d/0x1a0 fs/stat.c:526
 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

Memory state around the buggy address:
 ffffc9000d3afc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc9000d3afc80: f1 f1 f1 f1 00 f2 f2 f2 02 f2 00 f2 f2 f2 00 02
>ffffc9000d3afd00: f2 f2 00 07 f2 f2 00 00 00 00 00 00 f1 f1 f1 f1
                                                       ^
 ffffc9000d3afd80: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
 ffffc9000d3afe00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 f3
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/01 20:02 upstream 03d38806a902 c3901742 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: stack-out-of-bounds Write in fixup_umip_exception
2025/01/16 12:44 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: stack-out-of-bounds Write in fixup_umip_exception
* Struck through repros no longer work on HEAD.