[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CALAgD-4953yNbwDnL99Tzt+H=Sa7jGOzPWZ0VZJU-=XRrZ3DaA@mail.gmail.com>
Date: Wed, 28 Aug 2024 15:26:51 -0700
From: Xingyu Li <xli399@....edu>
To: akpm@...ux-foundation.org, urezki@...il.com, hch@...radead.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Yu Hao <yhao016@....edu>
Subject: BUG: stack segment fault in insert_vmap_area_augment
Hi,
We found a bug in Linux 6.10 using syzkaller. It is possibly a
corrupted stack bug.
The bug report is as follows, but unfortunately there is no generated
syzkaller reproducer.
Bug report:
Oops: stack segment: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 PID: 8042 Comm: syz-executor Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:__rb_insert lib/rbtree.c:115 [inline]
RIP: 0010:__rb_insert_augmented+0x90/0x6a0 lib/rbtree.c:459
Code: 48 89 ef e8 d2 4c 03 f7 4c 8b 6d 00 41 f6 c5 01 0f 85 0c 06 00
00 48 89 5c 24 18 48 89 2c 24 4d 8d 75 08 4c 89 f5 48 c1 ed 03 <42> 80
7c 3d 00 00 74 08 4c 89 f7 e8 a0 4c 03 f7 49 8b 1e 48 3b 1c
RSP: 0018:ffffc9000a9b74e8 EFLAGS: 00010202
RAX: 1ffff11003b5f029 RBX: ffff88801daf8148 RCX: 0000000000000000
RDX: ffffffff81e63c60 RSI: ffffffff92949620 RDI: ffff88801daf8148
RBP: 0000000000000001 R08: ffffffff81e68333 R09: 0000000000000000
R10: ffff88801daf8150 R11: ffff88802f3f1e00 R12: 1ffff110078b0ff0
R13: 0000000000000000 R14: 0000000000000008 R15: dffffc0000000000
FS: 0000555565ef3500(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f25ffff CR3: 000000001bc74000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
rb_insert_augmented include/linux/rbtree_augmented.h:50 [inline]
__link_va mm/vmalloc.c:1197 [inline]
link_va_augment mm/vmalloc.c:1221 [inline]
insert_vmap_area_augment+0x322/0x640 mm/vmalloc.c:1347
va_clip mm/vmalloc.c:1722 [inline]
va_alloc mm/vmalloc.c:1747 [inline]
__alloc_vmap_area mm/vmalloc.c:1783 [inline]
alloc_vmap_area+0xde6/0x2200 mm/vmalloc.c:1999
__get_vm_area_node+0x1c9/0x290 mm/vmalloc.c:3118
__vmalloc_node_range_noprof+0x3c5/0x1440 mm/vmalloc.c:3800
alloc_thread_stack_node+0x354/0x5f0 kernel/fork.c:309
dup_task_struct+0x8b/0x5a0 kernel/fork.c:1115
copy_process+0x5c8/0x3d80 kernel/fork.c:2220
kernel_clone+0x224/0x6c0 kernel/fork.c:2797
__do_sys_clone3 kernel/fork.c:3098 [inline]
__se_sys_clone3+0x2c6/0x340 kernel/fork.c:3082
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x7e/0x150 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x67/0x6f
RIP: 0033:0x7f22ec1b48e9
Code: bc 07 00 48 8d 3d 7c bc 07 00 e8 a2 29 f6 ff 66 90 b8 ea ff ff
ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85
c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
RSP: 002b:00007ffec2afdbf8 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
RAX: ffffffffffffffda RBX: 00007f22ec17ebc0 RCX: 00007f22ec1b48e9
RDX: 00007f22ec17ebc0 RSI: 0000000000000058 RDI: 00007ffec2afdc60
RBP: 00007ffec2afdcc0 R08: 00007ffec2afdcc0 R09: 0000000000000000
R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffa8
R13: 0000000000000009 R14: 00007ffec2afdc60 R15: 00007ffec2afe130
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__rb_insert lib/rbtree.c:115 [inline]
RIP: 0010:__rb_insert_augmented+0x90/0x6a0 lib/rbtree.c:459
Code: 48 89 ef e8 d2 4c 03 f7 4c 8b 6d 00 41 f6 c5 01 0f 85 0c 06 00
00 48 89 5c 24 18 48 89 2c 24 4d 8d 75 08 4c 89 f5 48 c1 ed 03 <42> 80
7c 3d 00 00 74 08 4c 89 f7 e8 a0 4c 03 f7 49 8b 1e 48 3b 1c
RSP: 0018:ffffc9000a9b74e8 EFLAGS: 00010202
RAX: 1ffff11003b5f029 RBX: ffff88801daf8148 RCX: 0000000000000000
RDX: ffffffff81e63c60 RSI: ffffffff92949620 RDI: ffff88801daf8148
RBP: 0000000000000001 R08: ffffffff81e68333 R09: 0000000000000000
R10: ffff88801daf8150 R11: ffff88802f3f1e00 R12: 1ffff110078b0ff0
R13: 0000000000000000 R14: 0000000000000008 R15: dffffc0000000000
FS: 0000555565ef3500(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f25ffff CR3: 000000001bc74000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 48 89 ef mov %rbp,%rdi
3: e8 d2 4c 03 f7 call 0xf7034cda
8: 4c 8b 6d 00 mov 0x0(%rbp),%r13
c: 41 f6 c5 01 test $0x1,%r13b
10: 0f 85 0c 06 00 00 jne 0x622
16: 48 89 5c 24 18 mov %rbx,0x18(%rsp)
1b: 48 89 2c 24 mov %rbp,(%rsp)
1f: 4d 8d 75 08 lea 0x8(%r13),%r14
23: 4c 89 f5 mov %r14,%rbp
26: 48 c1 ed 03 shr $0x3,%rbp
* 2a: 42 80 7c 3d 00 00 cmpb $0x0,0x0(%rbp,%r15,1) <-- trapping
instruction
30: 74 08 je 0x3a
32: 4c 89 f7 mov %r14,%rdi
35: e8 a0 4c 03 f7 call 0xf7034cda
3a: 49 8b 1e mov (%r14),%rbx
3d: 48 rex.W
3e: 3b .byte 0x3b
3f: 1c .byte 0x1c
--
Yours sincerely,
Xingyu
Powered by blists - more mailing lists