syzbot


KASAN: use-after-free Read in do_page_fault

Status: upstream: reported C repro on 2024/04/25 07:38
Reported-by: syzbot+07fb765afb817a7def53@syzkaller.appspotmail.com
First crash: 214d, last: 33d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: global-out-of-bounds Read in do_page_fault riscv 1 813d 809d 0/28 auto-obsoleted due to no activity on 2022/11/28 23:54
upstream KASAN: stack-out-of-bounds Read in do_page_fault net 1 676d 672d 0/28 auto-obsoleted due to no activity on 2023/04/15 09:50
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/10/19 17:26 8m retest repro android12-5.4 report log
2024/08/10 09:48 8m retest repro android12-5.4 report log
2024/06/01 09:05 6m retest repro android12-5.4 report log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:131 [inline]
BUG: KASAN: slab-out-of-bounds in trace_page_fault_entries arch/x86/mm/fault.c:1541 [inline]
BUG: KASAN: slab-out-of-bounds in do_page_fault+0x66/0x330 arch/x86/mm/fault.c:1553
Read of size 8 at addr ffff8881db787e60 by task syz-executor125/442

CPU: 1 PID: 442 Comm: syz-executor125 Not tainted 5.4.268-syzkaller-00003-g2d5d8240a7cb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:

Allocated by task 1172321806:
(stack is not available)

Freed by task 2237165368:
================================================================================
UBSAN: array-index-out-of-bounds in lib/stackdepot.c:205:15
index 2097151 is out of range for type 'void *[8192]'
CPU: 1 PID: 442 Comm: syz-executor125 Not tainted 5.4.268-syzkaller-00003-g2d5d8240a7cb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
================================================================================
usercopy: Kernel memory overwrite attempt detected to SLUB object 'kmalloc-2k' (offset 2688, size 2)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 442 Comm: syz-executor125 Not tainted 5.4.268-syzkaller-00003-g2d5d8240a7cb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:usercopy_abort+0x7f/0x90 mm/usercopy.c:87
Code: ce 49 89 ce 48 c7 c3 40 81 e3 84 48 0f 44 de 48 c7 c7 80 81 e3 84 4c 89 de 48 89 c1 41 52 41 56 53 e8 94 01 b6 02 48 83 c4 18 <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 55 41 57 41 56
RSP: 0018:ffff8881db787990 EFLAGS: 00010096
RAX: 0000000000000065 RBX: ffffffff84e38140 RCX: 8ec5b1bda75ca700
RDX: 0000000000000000 RSI: 0000000080000043 RDI: 0000000000000000
RBP: 0000000000000a80 R08: ffffffff814d6872 R09: ffffed103ede5262
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffea00076de000
R13: dffffc0000000000 R14: 0000000000000a80 R15: 0000000000000002
FS:  0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe8ffffd09c90 CR3: 00000001f5c2a000 CR4: 00000000003406a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
Modules linked in:
---[ end trace f959a0c8291fdda0 ]---
RIP: 0010:usercopy_abort+0x7f/0x90 mm/usercopy.c:87
Code: ce 49 89 ce 48 c7 c3 40 81 e3 84 48 0f 44 de 48 c7 c7 80 81 e3 84 4c 89 de 48 89 c1 41 52 41 56 53 e8 94 01 b6 02 48 83 c4 18 <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 55 41 57 41 56
RSP: 0018:ffff8881db787990 EFLAGS: 00010096
RAX: 0000000000000065 RBX: ffffffff84e38140 RCX: 8ec5b1bda75ca700
RDX: 0000000000000000 RSI: 0000000080000043 RDI: 0000000000000000
RBP: 0000000000000a80 R08: ffffffff814d6872 R09: ffffed103ede5262
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffea00076de000
R13: dffffc0000000000 R14: 0000000000000a80 R15: 0000000000000002
FS:  0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffe8ffffd09c90 CR3: 00000001f5c2a000 CR4: 00000000003406a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/25 07:31 android12-5.4 2d5d8240a7cb 8bdc0f22 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: slab-out-of-bounds Read in do_page_fault
2024/05/18 09:02 android12-5.4 51cf29fc2bfc c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/05/15 10:04 android12-5.4 51cf29fc2bfc 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/05/15 06:43 android12-5.4 51cf29fc2bfc fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/05/08 11:04 android12-5.4 51cf29fc2bfc 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/05/03 16:32 android12-5.4 51cf29fc2bfc dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/04/25 07:03 android12-5.4 2d5d8240a7cb 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/04/21 01:17 android12-5.4 2d5d8240a7cb af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: use-after-free Read in do_page_fault
2024/05/12 07:30 android12-5.4 51cf29fc2bfc 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: stack-out-of-bounds Read in do_page_fault
2024/04/28 02:58 android12-5.4 2d5d8240a7cb 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-perf-kasan KASAN: stack-out-of-bounds Read in do_page_fault
* Struck through repros no longer work on HEAD.