[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180824222927.GO6515@ZenIV.linux.org.uk>
Date: Fri, 24 Aug 2018 23:29:27 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Kees Cook <keescook@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andreas Christoforou <andreaschristofo@...il.com>,
Arnd Bergmann <arnd@...db.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipc/mqueue: Only perform resource calculation if user
valid
On Fri, Aug 24, 2018 at 02:54:39PM -0700, Kees Cook wrote:
> The overflow was real, but the results went unused, so while the flaw
> is harmless, it's noisy for kernel fuzzers, and the fix makes things
> technically more efficient.
yes, yes, yes, yes and no. Compiler is quite capable of noticing
that targets of assignments are unused outside of that if (user), so
any mentioning of "technically more efficient" is somewhat ridiculous...
Just make that something along the lines of "results of these assignments
are only used under if (user). Moreover, in case if info->user is NULL
they might yield an integer overflow, confusing the fuzzers. The odds
of any compiler letting nasal demons fly on that are pretty much nil,
but it's cleaner to move these under if (user) anyway."
Powered by blists - more mailing lists