* [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources
@ 2023-07-14 12:33 syzbot
2023-07-14 14:56 ` Pavel Skripkin
0 siblings, 1 reply; 5+ messages in thread
From: syzbot @ 2023-07-14 12:33 UTC (permalink / raw)
To: davem, herbert, linux-crypto, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 3f01e9fed845 Merge tag 'linux-watchdog-6.5-rc2' of git://w..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=14bac16aa80000
kernel config: https://syzkaller.appspot.com/x/.config?x=1542573e31cfbec5
dashboard link: https://syzkaller.appspot.com/bug?extid=cba21d50095623218389
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15dd215aa80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14530318a80000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4f212a7e36fe/disk-3f01e9fe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/de6b12daf908/vmlinux-3f01e9fe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2c1992ff2aaa/bzImage-3f01e9fe.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+cba21d50095623218389@syzkaller.appspotmail.com
=====================================================
BUG: KMSAN: uninit-value in af_alg_free_sg crypto/af_alg.c:545 [inline]
BUG: KMSAN: uninit-value in af_alg_free_areq_sgls crypto/af_alg.c:778 [inline]
BUG: KMSAN: uninit-value in af_alg_free_resources+0x3d1/0xf60 crypto/af_alg.c:1117
af_alg_free_sg crypto/af_alg.c:545 [inline]
af_alg_free_areq_sgls crypto/af_alg.c:778 [inline]
af_alg_free_resources+0x3d1/0xf60 crypto/af_alg.c:1117
_skcipher_recvmsg crypto/algif_skcipher.c:144 [inline]
skcipher_recvmsg+0x6a0/0x1a20 crypto/algif_skcipher.c:157
sock_recvmsg_nosec net/socket.c:1020 [inline]
sock_recvmsg net/socket.c:1041 [inline]
__sys_recvfrom+0x505/0x810 net/socket.c:2186
__do_sys_recvfrom net/socket.c:2204 [inline]
__se_sys_recvfrom net/socket.c:2200 [inline]
__x64_sys_recvfrom+0x126/0x1d0 net/socket.c:2200
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Uninit was created at:
slab_post_alloc_hook+0x12f/0xb70 mm/slab.h:767
slab_alloc_node mm/slub.c:3470 [inline]
__kmem_cache_alloc_node+0x536/0x8d0 mm/slub.c:3509
__do_kmalloc_node mm/slab_common.c:984 [inline]
__kmalloc+0x121/0x3c0 mm/slab_common.c:998
kmalloc include/linux/slab.h:586 [inline]
sock_kmalloc+0x128/0x1c0 net/core/sock.c:2683
af_alg_alloc_areq+0x41/0x2a0 crypto/af_alg.c:1188
_skcipher_recvmsg crypto/algif_skcipher.c:71 [inline]
skcipher_recvmsg+0x514/0x1a20 crypto/algif_skcipher.c:157
sock_recvmsg_nosec net/socket.c:1020 [inline]
sock_recvmsg net/socket.c:1041 [inline]
__sys_recvfrom+0x505/0x810 net/socket.c:2186
__do_sys_recvfrom net/socket.c:2204 [inline]
__se_sys_recvfrom net/socket.c:2200 [inline]
__x64_sys_recvfrom+0x126/0x1d0 net/socket.c:2200
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
CPU: 0 PID: 5031 Comm: syz-executor370 Not tainted 6.5.0-rc1-syzkaller-00006-g3f01e9fed845 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
=====================================================
---
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 bug is already fixed, 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 change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources
2023-07-14 12:33 [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources syzbot
@ 2023-07-14 14:56 ` Pavel Skripkin
2023-07-14 15:31 ` syzbot
2023-08-11 11:26 ` Herbert Xu
0 siblings, 2 replies; 5+ messages in thread
From: Pavel Skripkin @ 2023-07-14 14:56 UTC (permalink / raw)
To: syzbot, davem, herbert, linux-crypto, linux-kernel,
syzkaller-bugs
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
Hi Syzbot,
Syzbot <syzbot+cba21d50095623218389@syzkaller.appspotmail.com> says:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 3f01e9fed845 Merge tag 'linux-watchdog-6.5-rc2' of git://w..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=14bac16aa80000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1542573e31cfbec5
> dashboard link: https://syzkaller.appspot.com/bug?extid=cba21d50095623218389
> compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15dd215aa80000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14530318a80000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/4f212a7e36fe/disk-3f01e9fe.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/de6b12daf908/vmlinux-3f01e9fe.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/2c1992ff2aaa/bzImage-3f01e9fe.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+cba21d50095623218389@syzkaller.appspotmail.com
#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
With regards,
Pavel Skripkin
[-- Attachment #2: ph1 --]
[-- Type: text/plain, Size: 379 bytes --]
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 06b15b9f661c..4e4f2d837481 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -1241,6 +1241,8 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
return -ENOMEM;
}
+ rsgl->sgl.need_unpin = 0;
+
rsgl->sgl.sgt.sgl = rsgl->sgl.sgl;
rsgl->sgl.sgt.nents = 0;
rsgl->sgl.sgt.orig_nents = 0;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources
2023-07-14 14:56 ` Pavel Skripkin
@ 2023-07-14 15:31 ` syzbot
2023-08-11 11:26 ` Herbert Xu
1 sibling, 0 replies; 5+ messages in thread
From: syzbot @ 2023-07-14 15:31 UTC (permalink / raw)
To: davem, herbert, linux-crypto, linux-kernel, paskripkin,
syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-and-tested-by: syzbot+cba21d50095623218389@syzkaller.appspotmail.com
Tested on:
commit: 4b810bf0 Merge tag 'erofs-for-6.5-rc2-fixes' of git://..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1584e7d4a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=81133937a108454e
dashboard link: https://syzkaller.appspot.com/bug?extid=cba21d50095623218389
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=1305e904a80000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources
2023-07-14 14:56 ` Pavel Skripkin
2023-07-14 15:31 ` syzbot
@ 2023-08-11 11:26 ` Herbert Xu
2023-08-13 12:09 ` Pavel Skripkin
1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2023-08-11 11:26 UTC (permalink / raw)
To: Pavel Skripkin; +Cc: syzbot, davem, linux-crypto, linux-kernel, syzkaller-bugs
On Fri, Jul 14, 2023 at 05:56:54PM +0300, Pavel Skripkin wrote:
>
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+cba21d50095623218389@syzkaller.appspotmail.com
>
> #syz test
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
Will you be submitting this patch?
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources
2023-08-11 11:26 ` Herbert Xu
@ 2023-08-13 12:09 ` Pavel Skripkin
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Skripkin @ 2023-08-13 12:09 UTC (permalink / raw)
To: Herbert Xu; +Cc: syzbot, davem, linux-crypto, linux-kernel, syzkaller-bugs
Hi Herbert,
Herbert Xu <herbert@gondor.apana.org.au> says:
> On Fri, Jul 14, 2023 at 05:56:54PM +0300, Pavel Skripkin wrote:
>>
>> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> > Reported-by: syzbot+cba21d50095623218389@syzkaller.appspotmail.com
>>
>> #syz test
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>
> Will you be submitting this patch?
>
Yeah, will do it shortly. This bug got lost in my todo list...
With regards,
Pavel Skripkin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-13 12:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 12:33 [syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources syzbot
2023-07-14 14:56 ` Pavel Skripkin
2023-07-14 15:31 ` syzbot
2023-08-11 11:26 ` Herbert Xu
2023-08-13 12:09 ` Pavel Skripkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox