syzbot


KMSAN: kernel-infoleak in copy_siginfo_to_user (2)

Status: fixed on 2019/07/10 21:40
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+0d602a1b0d8c95bdf299@syzkaller.appspotmail.com
Fix commit: f6e2aa91a46d signal/ptrace: Don't leak unitialized kernel memory with PTRACE_PEEK_SIGINFO
First crash: 1878d, last: 1840d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KMSAN: uninit-value in copy_siginfo_to_user kernel syz 289 2176d 2168d 0/27 closed as dup on 2019/06/10 23:35
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 3.16 00/87] 3.16.75-rc1 review 99 (99) 2019/11/19 14:49
[PATCH 4.9 000/117] 4.9.183-stable review 121 (121) 2019/06/22 00:44
[PATCH 4.4 00/84] 4.4.183-stable review 88 (88) 2019/06/22 00:43
[PATCH 4.19 00/75] 4.19.53-stable review 83 (83) 2019/06/20 01:46
[PATCH 4.14 00/53] 4.14.128-stable review 62 (62) 2019/06/19 13:40
[PATCH 5.1 000/115] 5.1.12-stable review 132 (132) 2019/06/19 12:16
[PATCH] signal/ptrace: Don't leak unitialized kernel memory with PTRACE_PEEK_SIGINFO 4 (4) 2019/06/10 19:39
KMSAN: kernel-infoleak in copy_siginfo_to_user (2) 2 (3) 2019/05/28 19:47
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in copy_siginfo_to_user kernel C 779 1882d 2176d 0/27 closed as invalid on 2019/05/03 14:05
upstream KMSAN: kernel-infoleak-after-free in copy_siginfo_to_user (2) kernel C 2111 9d17h 246d 0/27 upstream: reported C repro on 2023/10/21 18:49

Sample crash report:
ptrace attach of "./syz-executor353086472"[10278] was attempted by "./syz-executor353086472"[10279]
ptrace attach of "./syz-executor353086472"[10280] was attempted by "./syz-executor353086472"[10281]
ptrace attach of "./syz-executor353086472"[10282] was attempted by "./syz-executor353086472"[10283]
==================================================================
BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
CPU: 1 PID: 10284 Comm: syz-executor353 Not tainted 5.1.0-rc7+ #5
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x130/0x2a0 mm/kmsan/kmsan.c:619
 kmsan_internal_check_memory+0x974/0xa80 mm/kmsan/kmsan.c:713
 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:492
 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
 copy_to_user include/linux/uaccess.h:174 [inline]
 copy_siginfo_to_user+0x80/0x160 kernel/signal.c:3059
 ptrace_peek_siginfo kernel/ptrace.c:742 [inline]
 ptrace_request+0x24bd/0x2950 kernel/ptrace.c:913
 arch_ptrace+0x9fa/0x1090 arch/x86/kernel/ptrace.c:868
 __do_sys_ptrace kernel/ptrace.c:1155 [inline]
 __se_sys_ptrace+0x2b9/0x7b0 kernel/ptrace.c:1120
 __x64_sys_ptrace+0x56/0x70 kernel/ptrace.c:1120
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x441cc9
Code: e8 bc e6 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 1b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00000000007efdd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000065
RAX: ffffffffffffffda RBX: 0000000000000063 RCX: 0000000000441cc9
RDX: 00000000200000c0 RSI: 0000000000000007 RDI: 0000000000004209
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000716000 R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000402a00 R14: 0000000000000000 R15: 0000000000000000

Local variable description: ----info.i@ptrace_request
Variable was created at:
 ptrace_peek_siginfo kernel/ptrace.c:714 [inline]
 ptrace_request+0x2161/0x2950 kernel/ptrace.c:913
 arch_ptrace+0x9fa/0x1090 arch/x86/kernel/ptrace.c:868

Bytes 0-47 of 48 are uninitialized
Memory access of size 48 starts at ffff8880a902fd70
Data copied to user address 0000000000716000
==================================================================

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/05/04 02:38 https://github.com/google/kmsan.git master d062d017e907 d28f4ce5 .config console log report syz C ci-upstream-kmsan-gce
2019/06/11 04:11 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config console log report ci-upstream-kmsan-gce
2019/06/10 19:54 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config console log report ci-upstream-kmsan-gce
2019/06/10 19:52 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config console log report ci-upstream-kmsan-gce
2019/06/07 08:56 https://github.com/google/kmsan.git master f75e4cfea97f 698773cb .config console log report ci-upstream-kmsan-gce
2019/06/07 07:27 https://github.com/google/kmsan.git master f75e4cfea97f 698773cb .config console log report ci-upstream-kmsan-gce
2019/06/06 17:56 https://github.com/google/kmsan.git master f75e4cfea97f 698773cb .config console log report ci-upstream-kmsan-gce
2019/06/06 04:13 https://github.com/google/kmsan.git master f75e4cfea97f a547defc .config console log report ci-upstream-kmsan-gce
2019/06/04 16:50 https://github.com/google/kmsan.git master f75e4cfea97f e41a20c5 .config console log report ci-upstream-kmsan-gce
2019/06/04 04:11 https://github.com/google/kmsan.git master f75e4cfea97f ce07a7ae .config console log report ci-upstream-kmsan-gce
2019/06/04 00:31 https://github.com/google/kmsan.git master f75e4cfea97f ce07a7ae .config console log report ci-upstream-kmsan-gce
2019/06/03 19:58 https://github.com/google/kmsan.git master f75e4cfea97f 63bf051f .config console log report ci-upstream-kmsan-gce
2019/05/04 01:38 https://github.com/google/kmsan.git master d062d017e907 d28f4ce5 .config console log report ci-upstream-kmsan-gce
2019/05/04 01:25 https://github.com/google/kmsan.git master d062d017e907 d28f4ce5 .config console log report ci-upstream-kmsan-gce
2019/05/04 01:15 https://github.com/google/kmsan.git master d062d017e907 d28f4ce5 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.