From: syzbot <syzbot+e8bcd7ee3db6cb5cb875@syzkaller.appspotmail.com>
To: davem@davemloft.net, herbert@gondor.apana.org.au,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: [syzbot] [crypto?] KMSAN: kernel-infoleak in rng_recvmsg
Date: Fri, 08 Aug 2025 01:07:29 -0700 [thread overview]
Message-ID: <6895b041.050a0220.7f033.0058.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: 6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=14a181a2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b6003cf8ecb92ff2
dashboard link: https://syzkaller.appspot.com/bug?extid=e8bcd7ee3db6cb5cb875
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=117fa1a2580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=105e9058580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3d9a1192a7cc/disk-6e64f458.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8f363fe8f54a/vmlinux-6e64f458.xz
kernel image: https://storage.googleapis.com/syzbot-assets/10b73833a575/bzImage-6e64f458.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e8bcd7ee3db6cb5cb875@syzkaller.appspotmail.com
=====================================================
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
BUG: KMSAN: kernel-infoleak in copy_to_user_iter lib/iov_iter.c:24 [inline]
BUG: KMSAN: kernel-infoleak in iterate_ubuf include/linux/iov_iter.h:30 [inline]
BUG: KMSAN: kernel-infoleak in iterate_and_advance2 include/linux/iov_iter.h:300 [inline]
BUG: KMSAN: kernel-infoleak in iterate_and_advance include/linux/iov_iter.h:328 [inline]
BUG: KMSAN: kernel-infoleak in _copy_to_iter+0xf0e/0x33f0 lib/iov_iter.c:185
instrument_copy_to_user include/linux/instrumented.h:114 [inline]
copy_to_user_iter lib/iov_iter.c:24 [inline]
iterate_ubuf include/linux/iov_iter.h:30 [inline]
iterate_and_advance2 include/linux/iov_iter.h:300 [inline]
iterate_and_advance include/linux/iov_iter.h:328 [inline]
_copy_to_iter+0xf0e/0x33f0 lib/iov_iter.c:185
copy_to_iter include/linux/uio.h:220 [inline]
memcpy_to_msg include/linux/skbuff.h:4202 [inline]
_rng_recvmsg crypto/algif_rng.c:101 [inline]
rng_recvmsg+0x1af/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
<Zero or more stacks not recorded to save memory>
Uninit was stored to memory at:
crypto_sha3_finup+0x136/0xe00 crypto/sha3_generic.c:202
crypto_shash_op_and_zero crypto/shash.c:105 [inline]
crypto_shash_finup+0x327/0xe80 crypto/shash.c:171
jent_hash_time+0x247/0x590 crypto/jitterentropy-kcapi.c:138
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
crypto_shash_finup+0xc5a/0xe80 crypto/shash.c:162
crypto_shash_update include/crypto/hash.h:994 [inline]
jent_hash_time+0x1de/0x590 crypto/jitterentropy-kcapi.c:136
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
put_unaligned_le64 include/linux/unaligned.h:43 [inline]
crypto_sha3_finup+0xc98/0xe00 crypto/sha3_generic.c:213
crypto_shash_op_and_zero crypto/shash.c:105 [inline]
crypto_shash_finup+0x327/0xe80 crypto/shash.c:171
jent_hash_time+0x247/0x590 crypto/jitterentropy-kcapi.c:138
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
keccakf_round crypto/sha3_generic.c:-1 [inline]
keccakf+0x1efb/0x2110 crypto/sha3_generic.c:155
crypto_sha3_finup+0x772/0xe00 crypto/sha3_generic.c:210
crypto_shash_op_and_zero crypto/shash.c:105 [inline]
crypto_shash_finup+0x327/0xe80 crypto/shash.c:171
jent_hash_time+0x247/0x590 crypto/jitterentropy-kcapi.c:138
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
crypto_sha3_finup+0x5be/0xe00 crypto/sha3_generic.c:207
crypto_shash_op_and_zero crypto/shash.c:105 [inline]
crypto_shash_finup+0x327/0xe80 crypto/shash.c:171
jent_hash_time+0x247/0x590 crypto/jitterentropy-kcapi.c:138
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
crypto_sha3_finup+0x136/0xe00 crypto/sha3_generic.c:202
crypto_shash_op_and_zero crypto/shash.c:105 [inline]
crypto_shash_finup+0x327/0xe80 crypto/shash.c:171
jent_hash_time+0x247/0x590 crypto/jitterentropy-kcapi.c:138
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
crypto_shash_finup+0xc5a/0xe80 crypto/shash.c:162
crypto_shash_update include/crypto/hash.h:994 [inline]
jent_hash_time+0x1de/0x590 crypto/jitterentropy-kcapi.c:136
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
jent_measure_jitter+0x547/0x770 crypto/jitterentropy.c:541
jent_gen_entropy+0x209/0x450 crypto/jitterentropy.c:569
jent_read_entropy+0x353/0xeb0 crypto/jitterentropy.c:615
jent_kcapi_random+0x6c/0x250 crypto/jitterentropy-kcapi.c:284
crypto_rng_generate include/crypto/rng.h:144 [inline]
_rng_recvmsg crypto/algif_rng.c:97 [inline]
rng_recvmsg+0x149/0x2d0 crypto/algif_rng.c:114
sock_recvmsg_nosec net/socket.c:1065 [inline]
sock_recvmsg+0x2df/0x390 net/socket.c:1087
sock_read_iter+0x2c8/0x360 net/socket.c:1157
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x857/0xf00 fs/read_write.c:572
ksys_read fs/read_write.c:715 [inline]
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x1fb/0x4d0 fs/read_write.c:722
x64_sys_call+0x2f9c/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Local variable intermediary created at:
jent_hash_time+0x9b/0x590 crypto/jitterentropy-kcapi.c:110
jent_condition_data+0x4f0/0x510 crypto/jitterentropy.c:438
Bytes 0-23 of 24 are uninitialized
Memory access of size 24 starts at ffff88811855fb70
Data copied to user address 00002000000001c0
CPU: 1 UID: 0 PID: 5820 Comm: syz-executor170 Not tainted 6.16.0-syzkaller-11952-g6e64f4580381 #0 PREEMPT(none)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
=====================================================
---
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 syzkaller@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
next reply other threads:[~2025-08-08 8:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 8:07 syzbot [this message]
2025-08-09 7:19 ` [syzbot] [crypto?] KMSAN: kernel-infoleak in rng_recvmsg Edward Adam Davis
2025-08-09 9:52 ` syzbot
2025-08-09 9:59 ` [PATCH] crypto: Prevent " Edward Adam Davis
2025-08-16 9:17 ` Herbert Xu
2025-08-17 8:51 ` Herbert Xu
2025-08-17 10:59 ` [PATCH V2] crypto: Mark intermediary memory as clean Edward Adam Davis
2025-08-17 11:40 ` Herbert Xu
2025-08-18 12:17 ` Edward Adam Davis
2025-08-18 12:30 ` Herbert Xu
2025-08-18 12:43 ` Edward Adam Davis
2025-08-18 13:13 ` Stephan Mueller
2025-08-18 13:24 ` [PATCH V3] " Edward Adam Davis
2025-08-18 13:32 ` Stephan Mueller
2025-08-30 8:45 ` Herbert Xu
2025-08-26 13:51 ` [PATCH] crypto: Prevent kernel-infoleak in rng_recvmsg Ard Biesheuvel
2025-08-26 16:58 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6895b041.050a0220.7f033.0058.GAE@google.com \
--to=syzbot+e8bcd7ee3db6cb5cb875@syzkaller.appspotmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.