BUG: bad usercopy in keyctl_pkey_e_d_s

Status: premoderation: reported C repro on 2026/10/15 11:27
Bug presence: origin:lts
[Documentation on labels]
Reported-by: syzbot+28611e3ede753ab6c8c9@syzkaller.appspotmail.com
First crash: 16d, last: 6d19h
▶ ▼ Bug presence (2)
Date Name Commit Repro Result
2026/10/16 lts (merge base) e9f803bf2b03 C [report] BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/16 upstream (ToT) 90201351a862 C Didn't crash

Sample crash report:
usercopy: Kernel memory exposure attempt detected from SLUB object 'kmalloc-64' (offset 0, size 512)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:103!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 312 Comm: syz-executor254 Not tainted syzkaller #0 790d506eeb1243e613a7e15525cb861d28cb7486
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:usercopy_abort+0x89/0x90 mm/usercopy.c:103
Code: 89 cb 49 c7 c6 e0 13 37 86 4c 0f 44 f6 48 c7 c7 80 12 37 86 4c 89 de 4c 89 c9 4d 89 d1 50 53 41 56 e8 1b 75 ff ff 48 83 c4 18 <0f> 0b cc cc cc cc cc b8 df 81 03 ae 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000120fad0 EFLAGS: 00010292
RAX: 0000000000000065 RBX: 0000000000000000 RCX: d65c64ca8db0f000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002
RBP: ffffc9000120fae0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000241ebc R12: ffff8881000418c0
R13: 0000000000000001 R14: ffffffff863713e0 R15: 0000000000000000
FS:  00005555914293c0(0000) GS:ffff8881f6c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005570c30ce000 CR3: 000000010674a000 CR4: 00000000003526b0
Call Trace:
 <TASK>
 __check_heap_object+0xc7/0x110 mm/slub.c:5800
 check_heap_object mm/usercopy.c:198 [inline]
 __check_object_size+0x29a/0x870 mm/usercopy.c:257
 check_object_size include/linux/thread_info.h:215 [inline]
 check_copy_size include/linux/thread_info.h:251 [inline]
 copy_to_user include/linux/uaccess.h:219 [inline]
 keyctl_pkey_e_d_s+0x252/0x3b0 security/keys/keyctl_pkey.c:259
 __do_sys_keyctl security/keys/keyctl.c:1997 [inline]
 __se_sys_keyctl+0x780/0xe40 security/keys/keyctl.c:1874
 __x64_sys_keyctl+0xc3/0xf0 security/keys/keyctl.c:1874
 x64_sys_call+0x996/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:251
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7fe268b4cc39
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe98ff5c38 EFLAGS: 00000246 ORIG_RAX: 00000000000000fa
RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007fe268b4cc39
RDX: 0000000000000000 RSI: 0000200000000a00 RDI: 0000000000000019
RBP: 0000000000000001 R08: 0000000000000000 R09: 00007ffe98ff5d68
R10: 0000200000000a40 R11: 0000000000000246 R12: 00007ffe98ff5d58
R13: 0000000000000002 R14: 00007fe268bddca0 R15: 0000000000000002
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:usercopy_abort+0x89/0x90 mm/usercopy.c:103
Code: 89 cb 49 c7 c6 e0 13 37 86 4c 0f 44 f6 48 c7 c7 80 12 37 86 4c 89 de 4c 89 c9 4d 89 d1 50 53 41 56 e8 1b 75 ff ff 48 83 c4 18 <0f> 0b cc cc cc cc cc b8 df 81 03 ae 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000120fad0 EFLAGS: 00010292
RAX: 0000000000000065 RBX: 0000000000000000 RCX: d65c64ca8db0f000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002
RBP: ffffc9000120fae0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000241ebc R12: ffff8881000418c0
R13: 0000000000000001 R14: ffffffff863713e0 R15: 0000000000000000
FS:  00005555914293c0(0000) GS:ffff8881f6c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005570c30ce000 CR3: 000000010674a000 CR4: 00000000003526b0

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/25 01:27 android16-6.12 32521e28daaa 1d9ca40b .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/20 09:26 android16-6.12 3e51fbb70e49 72cdc28d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/15 11:45 android16-6.12 4fc23344fdfc 8fb0ae89 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/24 07:14 android16-6.12 2231183cf51f 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/20 20:17 android16-6.12 3e51fbb70e49 df8746fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/18 08:48 android16-6.12 49f96790cc76 432c0077 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/16 06:51 android16-6.12 1973ed3d1d63 3f2522c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/15 11:29 android16-6.12 4fc23344fdfc 8fb0ae89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
2026/10/15 11:26 android16-6.12 4fc23344fdfc 8fb0ae89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust BUG: bad usercopy in keyctl_pkey_e_d_s
* Struck through repros no longer work on HEAD.