lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <57b6c152.8c2c.19685f4cf41.Coremail.luckd0g@163.com>
Date: Wed, 30 Apr 2025 17:08:55 +0800 (CST)
From: "Jianzhou Zhao" <luckd0g@....com>
To: linkinjeon@...nel.org, sj1557.seo@...sung.com, yuezhang.mo@...y.com
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject:  KASAN: vmalloc-out-of-bounds Write in vfree_atomic   in  Linux
 v6.15-rc4

Hello, I found a potential bug titled "  KASAN: vmalloc-out-of-bounds Write in vfree_atomic " with modified syzkaller in the  Linux v6.15-rc4.
If you fix this issue, please add the following tag to the commit:  Reported-by: Jianzhou Zhao <luckd0g@....com>,    xingwei lee <xrivendell7@...il.com>
The commit of the kernel is : ca91b9500108d4cf083a635c2e11c884d5dd20ea
kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=ca17f2d2ba38f7a0
compiler: gcc version 11.4.0

Unfortunately, we failed to generate the reproduction program of this bug.

------------[ cut here ]-----------------------------------------
KASAN: vmalloc-out-of-bounds Write in vfree_atomic
------------[ cut here ]------------
==================================================================
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in llist_add_batch+0x15f/0x180 lib/llist.c:32
Write of size 8 at addr ffffc90005319000 by task syz.4.373/14262

CPU: 0 UID: 0 PID: 14262 Comm: syz.4.373 Not tainted 6.15.0-rc4-00021-gca91b9500108-dirty #11 PREEMPT(full) 
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1b0 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:408 [inline]
 print_report+0xc1/0x630 mm/kasan/report.c:521
 kasan_report+0x96/0xd0 mm/kasan/report.c:634
 llist_add_batch+0x15f/0x180 lib/llist.c:32
 llist_add include/linux/llist.h:248 [inline]
 vfree_atomic+0x5e/0xe0 mm/vmalloc.c:3326
 vfree+0x708/0x8a0 mm/vmalloc.c:3353
 delayed_free+0x49/0xb0 fs/exfat/super.c:799
 rcu_do_batch kernel/rcu/tree.c:2568 [inline]
 rcu_core+0x7a1/0x1660 kernel/rcu/tree.c:2824
 handle_softirqs+0x1bf/0x890 kernel/softirq.c:579
 __do_softirq kernel/softirq.c:613 [inline]
 invoke_softirq kernel/softirq.c:453 [inline]
 __irq_exit_rcu kernel/softirq.c:680 [inline]
 irq_exit_rcu+0xfd/0x150 kernel/softirq.c:696
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
 sysvec_apic_timer_interrupt+0xa8/0xc0 arch/x86/kernel/apic/apic.c:1049
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:preempt_schedule_irq+0x4c/0x90 kernel/sched/core.c:7090
Code: df 55 65 48 8b 2d 9c 4c 3c 08 53 48 89 eb 48 c1 eb 03 48 01 c3 bf 01 00 00 00 e8 2f a8 16 f6 e8 0a 9d 50 f6 fb bf 01 00 00 00 <e8> 5f a6 ff ff 9c 58 fa f6 c4 02 75 1e bf 01 00 00 00 e8 cd 58 16
RSP: 0018:ffffc90003837268 EFLAGS: 00000246
RAX: 0000000000000001 RBX: ffffed1004155000 RCX: ffffffff81c2a0f4
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001
RBP: ffff888020aa8000 R08: 0000000000000000 R09: 0000000000000000
R10: fffffbfff210a52a R11: ffffffff90852957 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 irqentry_exit+0x36/0x90 kernel/entry/common.c:354
 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:__orc_find+0x8/0xf0 arch/x86/kernel/unwind_orc.c:85
Code: 90 90 48 8b 07 c3 cc cc cc cc 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 57 89 d0 41 56 41 55 <41> 54 4c 8d 64 87 fc 55 53 48 83 ec 10 85 d2 0f 84 99 00 00 00 49
RSP: 0018:ffffc90003837330 EFLAGS: 00000206
RAX: 0000000000000022 RBX: 1ffff92000706e72 RCX: ffffffff8100012f
RDX: 0000000000000022 RSI: ffffffff91156622 RDI: ffffffff90933edc
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff91156622
R10: 00000000000a750b R11: 0000000000000003 R12: ffffc90003837490
R13: ffffc90003837480 R14: ffffc90003837448 R15: ffffc9000383747d
 orc_find arch/x86/kernel/unwind_orc.c:227 [inline]
 unwind_next_frame+0x383/0x1c20 arch/x86/kernel/unwind_orc.c:494
 arch_stack_walk+0x86/0xf0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
 kasan_save_stack+0x24/0x50 mm/kasan/common.c:47
 kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:548
 slab_free_hook mm/slub.c:2359 [inline]
 slab_free mm/slub.c:4656 [inline]
 kmem_cache_free+0x38f/0x550 mm/slub.c:4758
 anon_vma_free mm/rmap.c:137 [inline]
 __put_anon_vma+0x114/0x390 mm/rmap.c:2756
 put_anon_vma include/linux/rmap.h:117 [inline]
 unlink_anon_vmas+0x577/0x870 mm/rmap.c:444
 free_pgtables+0xc7/0x7b0 mm/memory.c:370
 exit_mmap+0x41e/0xbe0 mm/mmap.c:1295
 __mmput kernel/fork.c:1379 [inline]
 mmput+0x178/0x450 kernel/fork.c:1401
 exit_mm kernel/exit.c:589 [inline]
 do_exit+0x95e/0x2f80 kernel/exit.c:940
 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102
 get_signal+0x2509/0x2760 kernel/signal.c:3034
 arch_do_signal_or_restart+0x80/0x8b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x228/0x2a0 kernel/entry/common.c:218
 do_syscall_64+0xdc/0x260 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f80f5fae41e
Code: Unable to access opcode bytes at 0x7f80f5fae3f4.
RSP: 002b:00007f80f6e65da8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: fffffffffffffff4 RBX: 00000000000014d7 RCX: 00007f80f5fae41e
RDX: 0000200000000180 RSI: 0000200000000000 RDI: 00007f80f6e65e00
RBP: 00007f80f6e65e40 R08: 00007f80f6e65e40 R09: 0000000000000000
R10: 0000000000004000 R11: 0000000000000246 R12: 0000200000000180
R13: 0000200000000000 R14: 00007f80f6e65e00 R15: 00002000000001c0
 </TASK>

The buggy address ffffc90005319000 belongs to a vmalloc virtual mapping
Memory state around the buggy address:
 ffffc90005318f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90005318f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc90005319000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                   ^
 ffffc90005319080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90005319100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================
vkms_vblank_simulate: vblank timer overrun
----------------
Code disassembly (best guess):
   0:	df 55 65             	fists  0x65(%rbp)
   3:	48 8b 2d 9c 4c 3c 08 	mov    0x83c4c9c(%rip),%rbp        # 0x83c4ca6
   a:	53                   	push   %rbx
   b:	48 89 eb             	mov    %rbp,%rbx
   e:	48 c1 eb 03          	shr    $0x3,%rbx
  12:	48 01 c3             	add    %rax,%rbx
  15:	bf 01 00 00 00       	mov    $0x1,%edi
  1a:	e8 2f a8 16 f6       	call   0xf616a84e
  1f:	e8 0a 9d 50 f6       	call   0xf6509d2e
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 5f a6 ff ff       	call   0xffffa68e <-- trapping instruction
  2f:	9c                   	pushf
  30:	58                   	pop    %rax
  31:	fa                   	cli
  32:	f6 c4 02             	test   $0x2,%ah
  35:	75 1e                	jne    0x55
  37:	bf 01 00 00 00       	mov    $0x1,%edi
  3c:	e8                   	.byte 0xe8
  3d:	cd 58                	int    $0x58
  3f:	16                   	(bad)
==================================================================

I hope it helps.
Best regards
Jianzhou Zhao <luckd0g@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ