All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+9c251bdd09f83b92ba95@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: KMSAN: uninit-value in af_alg_free_areq_sgls
Date: Sun, 08 Apr 2018 00:07:01 -0700	[thread overview]
Message-ID: <00000000000092ad87056950ef9e@google.com> (raw)

Hello,

syzbot hit the following crash on  
https://github.com/google/kmsan.git/master commit
e2ab7e8abba47a2f2698216258e5d8727ae58717 (Fri Apr 6 16:24:31 2018 +0000)
kmsan: temporarily disable visitAsmInstruction() to help syzbot
syzbot dashboard link:  
https://syzkaller.appspot.com/bug?extid=9c251bdd09f83b92ba95

So far this crash happened 11 times on  
https://github.com/google/kmsan.git/master.
C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5551473324720128
syzkaller reproducer:  
https://syzkaller.appspot.com/x/repro.syz?id=4782073151750144
Raw console output:  
https://syzkaller.appspot.com/x/log.txt?id=5003160619843584
Kernel config:  
https://syzkaller.appspot.com/x/.config?id=6627248707860932248
compiler: clang version 7.0.0 (trunk 329391)

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+9c251bdd09f83b92ba95@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for  
details.
If you forward the report, please keep this part and the footer.

==================================================================
BUG: KMSAN: uninit-value in atomic_sub arch/x86/include/asm/atomic.h:65  
[inline]
BUG: KMSAN: uninit-value in af_alg_free_areq_sgls+0x5ff/0xb20  
crypto/af_alg.c:669
CPU: 1 PID: 3568 Comm: syzkaller909997 Not tainted 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Call Trace:
  __dump_stack lib/dump_stack.c:17 [inline]
  dump_stack+0x185/0x1d0 lib/dump_stack.c:53
  kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
  __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676
  atomic_sub arch/x86/include/asm/atomic.h:65 [inline]
  af_alg_free_areq_sgls+0x5ff/0xb20 crypto/af_alg.c:669
  af_alg_free_resources+0x66/0xf0 crypto/af_alg.c:1033
  _aead_recvmsg crypto/algif_aead.c:321 [inline]
  aead_recvmsg+0x9a4/0x2960 crypto/algif_aead.c:334
  aead_recvmsg_nokey+0x129/0x160 crypto/algif_aead.c:452
  sock_recvmsg_nosec net/socket.c:803 [inline]
  sock_recvmsg+0x1d0/0x230 net/socket.c:810
  ___sys_recvmsg+0x3fb/0x810 net/socket.c:2205
  __sys_recvmsg net/socket.c:2250 [inline]
  SYSC_recvmsg+0x298/0x3c0 net/socket.c:2262
  SyS_recvmsg+0x54/0x80 net/socket.c:2257
  do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x43ff29
RSP: 002b:00007ffd9919c808 EFLAGS: 00000207 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043ff29
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000207 R12: 0000000000401850
R13: 00000000004018e0 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
  kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
  kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:188
  kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:314
  __kmalloc+0x23c/0x350 mm/slub.c:3791
  kmalloc include/linux/slab.h:517 [inline]
  sock_kmalloc+0x14e/0x270 net/core/sock.c:1986
  af_alg_get_rsgl+0x427/0xe10 crypto/af_alg.c:1149
  _aead_recvmsg crypto/algif_aead.c:163 [inline]
  aead_recvmsg+0x953/0x2960 crypto/algif_aead.c:334
  aead_recvmsg_nokey+0x129/0x160 crypto/algif_aead.c:452
  sock_recvmsg_nosec net/socket.c:803 [inline]
  sock_recvmsg+0x1d0/0x230 net/socket.c:810
  ___sys_recvmsg+0x3fb/0x810 net/socket.c:2205
  __sys_recvmsg net/socket.c:2250 [inline]
  SYSC_recvmsg+0x298/0x3c0 net/socket.c:2262
  SyS_recvmsg+0x54/0x80 net/socket.c:2257
  do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
==================================================================


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzkaller@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is  
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug  
report.
Note: all commands must start from beginning of the line in the email body.

             reply	other threads:[~2018-04-08  7:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-08  7:07 syzbot [this message]
2018-04-08 17:57 ` [PATCH] AF_ALG: register completely initialized request in list Stephan Müller
2018-04-09  7:51   ` Dmitry Vyukov
2018-04-09  7:54     ` Stephan Mueller
2018-07-04 23:37       ` Eric Biggers
2018-07-05  7:49         ` Stephan Müller
2018-07-05  8:43           ` Dmitry Vyukov
2018-07-05 15:58 ` [PATCH v2] AF_ALG: Initialize sg_num_bytes in error code path Stephan Müller
2018-07-05 17:02   ` KMSAN: uninit-value in af_alg_free_areq_sgls syzbot
2018-07-05 18:45     ` Stephan Müller
2018-07-06  7:38       ` Dmitry Vyukov
2018-07-06  7:41         ` Stephan Mueller
2018-07-06  7:44           ` Dmitry Vyukov
2018-07-06  7:50 ` [PATCH v3] AF_ALG: Initialize sg_num_bytes in error code path Stephan Müller
2018-07-06  7:58   ` Dmitry Vyukov
2018-07-06  8:09   ` KMSAN: uninit-value in af_alg_free_areq_sgls syzbot
2018-07-06  8:19     ` Dmitry Vyukov
2018-07-06 15:30       ` Dmitry Vyukov
2018-07-06 15:55         ` syzbot
2018-07-06 16:27       ` Stephan Mueller
2018-07-06 21:57   ` [PATCH v3] AF_ALG: Initialize sg_num_bytes in error code path Eric Biggers
2018-07-07 18:41 ` [PATCH v4] " Stephan Müller
2018-07-07 19:01   ` KMSAN: uninit-value in af_alg_free_areq_sgls syzbot
2018-07-13 10:34   ` [PATCH v4] AF_ALG: Initialize sg_num_bytes in error code path Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2018-07-20 12:14 [PATCH 4.14 56/92] crypto: af_alg - " Greg Kroah-Hartman
2018-07-20 12:54 ` KMSAN: uninit-value in af_alg_free_areq_sgls syzbot
2018-07-20 12:14 [PATCH 4.17 066/101] crypto: af_alg - Initialize sg_num_bytes in error code path Greg Kroah-Hartman
2018-07-20 13:08 ` KMSAN: uninit-value in af_alg_free_areq_sgls syzbot

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=00000000000092ad87056950ef9e@google.com \
    --to=syzbot+9c251bdd09f83b92ba95@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.