linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: syzbot <syzbot+9c251bdd09f83b92ba95@syzkaller.appspotmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Stephan Mueller <smueller@chronox.de>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: KMSAN: uninit-value in af_alg_free_areq_sgls
Date: Fri, 6 Jul 2018 17:30:20 +0200	[thread overview]
Message-ID: <CACT4Y+bMV5bU9tJodF50fu2VZ0AH3ZE0WZsinNs7whEumMRWRA@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+Yv8M93-N3J1U6r1X=Oy2SaKQpJU1S6iJeFC8bJMnjuKg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3416 bytes --]

On Fri, Jul 6, 2018 at 10:19 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
> On Fri, Jul 6, 2018 at 10:09 AM, syzbot
> <syzbot+9c251bdd09f83b92ba95@syzkaller.appspotmail.com> wrote:
>> Hello,
>>
>> syzbot tried to test the proposed patch but build/boot failed:
>>
>> lost connection to test machine
>
> Looking into this.

Should be fixed now, let's try again:

#syz test: https://github.com/google/kmsan.git master


>> [....] Starting enhanced syslogd: rsyslogd [?25l [?1c 7 [1G[ [32m ok [39;49m
>> 8 [?25h [?0c.
>> [....] Starting periodic command scheduler: cron [?25l [?1c 7 [1G[ [32m ok
>> [39;49m 8 [?25h [?0c.
>> [....] Starting OpenBSD Secure Shell server: sshd[   21.709280] random:
>> sshd: uninitialized urandom read (32 bytes read)
>> [?25l [?1c 7 [1G[ [32m ok  [39;49m 8 [?25h [?0c.
>>
>> Debian GNU/Linux 7 syzkaller ttyS0
>>
>> syzkaller login: [   26.229113] random: sshd: uninitialized urandom read (32
>> bytes read)
>> [   26.532843] random: sshd: uninitialized urandom read (32 bytes read)
>> [   27.787277] random: sshd: uninitialized urandom read (32 bytes read)
>> Warning: Permanently added '10.128.0.2' (ECDSA) to the list of known hosts.
>> [   33.299368] random: sshd: uninitialized urandom read (32 bytes read)
>> flag provided but not defined: -os
>> Usage of ./syz-fuzzer:
>>   -abort_signal int
>>         initial signal to send to executor in error conditions; upgrades to
>> SIGKILL if executor does not exit
>>   -arch string
>>         target arch (default "amd64")
>>   -buffer_size uint
>>         internal buffer size (in bytes) for executor output
>>   -collide
>>         collide syscalls to provoke data races (default true)
>>   -cover
>>         collect feedback signals (coverage)
>>   -debug
>>         debug output from executor
>>   -executor string
>>         path to executor binary (default "./syz-executor")
>>   -ipc string
>>         ipc scheme (pipe/shmem)
>>   -leak
>>         detect memory leaks
>>   -manager string
>>         manager rpc address
>>   -name string
>>         unique name for manager (default "test")
>>   -output string
>>         write programs to none/stdout/dmesg/file (default "stdout")
>>   -pprof string
>>         address to serve pprof profiles
>>   -procs int
>>         number of parallel test processes (default 1)
>>   -sandbox string
>>         sandbox for fuzzing (none/setuid/namespace) (default "none")
>>   -test
>>         enable image testing mode
>>   -threaded
>>         use threaded mode in executor (default true)
>>   -timeout duration
>>         execution timeout
>>   -v int
>>         verbosity
>>
>>
>>
>> Tested on:
>>
>> commit:         9c9df9f275f0 kmsan: remove kmsan_threads_ready
>> git tree:       https://github.com/google/kmsan.git/master
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=b11f4cfb262ee607
>> compiler:       clang version 7.0.0 (trunk 334104)
>> patch:          https://syzkaller.appspot.com/x/patch.diff?x=16a5af84400000
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "syzkaller-bugs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to syzkaller-bugs+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/syzkaller-bugs/000000000000363e2e0570502d42%40google.com.
>>
>> For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: alg.patch --]
[-- Type: text/x-patch, Size: 409 bytes --]

--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -1148,8 +1148,10 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
 
 		/* make one iovec available as scatterlist */
 		err = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen);
-		if (err < 0)
+		if (err < 0) {
+			rsgl->sg_num_bytes = 0;
 			return err;
+		}
 
 		/* chain the new scatterlist with previous one */
 		if (areq->last_rsgl)

  reply	other threads:[~2018-07-06 15:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-08  7:07 KMSAN: uninit-value in af_alg_free_areq_sgls syzbot
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 [this message]
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
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=CACT4Y+bMV5bU9tJodF50fu2VZ0AH3ZE0WZsinNs7whEumMRWRA@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smueller@chronox.de \
    --cc=syzbot+9c251bdd09f83b92ba95@syzkaller.appspotmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).