[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wi8iGD8zHuPr38m9MUwDwf3qy2FYSbyoQ_Ygky+D-pU1Q@mail.gmail.com>
Date: Mon, 17 Dec 2018 10:49:59 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: ebiggers@...nel.org, James Morris James Morris <jmorris@...ei.org>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Peter Huewe <peterhuewe@....de>
Cc: David Howells <dhowells@...hat.com>, keyrings@...r.kernel.org,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH RESEND] KEYS: fix parsing invalid pkey info string
On Mon, Dec 17, 2018 at 10:43 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> Or maybe just remove it entirely, since it's clearly entirely
> incorrect from the very start.
.. or another alternative: remove the "Opt_err = -1" entirely.
Again, this seems to be a buggy pattern exclusive to the security
code. Nobody else does it, and using that negative value is basically
the source of those two bugs. It seems pointless and wrong.
So the *simplest* fix would seem to be to literally remove all those
"= -1" for the Opt_err initialization. Making the code smaller,
simpler, and fixing the bug in the process.
Hmm?
Linus
Powered by blists - more mailing lists