[syzbot] [crypto?] KMSAN: uninit-value in af_alg_free_resources

8 views
Skip to first unread message

syzbot

unread,
Jul 14, 2023, 8:33:44 AM7/14/23
to da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
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+cba21d...@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 syzk...@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

Pavel Skripkin

unread,
Jul 14, 2023, 10:56:59 AM7/14/23
to syzbot, da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hi Syzbot,

Syzbot <syzbot+cba21d...@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+cba21d...@syzkaller.appspotmail.com

#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master





With regards,
Pavel Skripkin
ph1

syzbot

unread,
Jul 14, 2023, 11:31:23 AM7/14/23
to da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, linux-...@vger.kernel.org, paskr...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+cba21d...@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.

Herbert Xu

unread,
Aug 11, 2023, 7:27:14 AM8/11/23
to Pavel Skripkin, syzbot, da...@davemloft.net, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
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+cba21d...@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 <her...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Pavel Skripkin

unread,
Aug 13, 2023, 8:09:58 AM8/13/23
to Herbert Xu, syzbot, da...@davemloft.net, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hi Herbert,

Herbert Xu <her...@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+cba21d...@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
Reply all
Reply to author
Forward
0 new messages