[Android 5.4] KASAN: use-after-free Read in do_page_fault

1 view
Skip to first unread message

syzbot

unread,
Apr 25, 2024, 3:38:30 AMApr 25
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2d5d8240a7cb UPSTREAM: netfilter: nf_tables: release mutex..
git tree: android12-5.4
console+strace: https://syzkaller.appspot.com/x/log.txt?x=174b7a9b180000
kernel config: https://syzkaller.appspot.com/x/.config?x=60c0e8be982a03fd
dashboard link: https://syzkaller.appspot.com/bug?extid=07fb765afb817a7def53
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15340a9b180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10dff07b180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/67ec6c62db55/disk-2d5d8240.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6e9bba575875/vmlinux-2d5d8240.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7e5fa4f9f6a4/bzImage-2d5d8240.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+07fb76...@syzkaller.appspotmail.com

==================================================================
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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages