From: James Morris Subject: Re: [PATCH] X.509: fix comparisons of ->pkey_algo Date: Mon, 27 Nov 2017 19:22:59 +1100 (AEDT) Message-ID: References: <20171127071724.25874-1-ebiggers3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: keyrings@vger.kernel.org, David Howells , linux-crypto@vger.kernel.org, Alexander Potapenko , Eric Biggers , stable@vger.kernel.org To: Eric Biggers Return-path: In-Reply-To: <20171127071724.25874-1-ebiggers3@gmail.com> Sender: stable-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org On Sun, 26 Nov 2017, Eric Biggers wrote: > From: Eric Biggers > > ->pkey_algo used to be an enum, but was changed to a string by commit > 4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum"). But > two comparisons were not updated. Fix them to use strcmp(). > > This bug broke signature verification in certain configurations, > depending on whether the string constants were deduplicated or not. > > Fixes: 4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum") > Cc: # v4.6+ > Signed-off-by: Eric Biggers > --- > crypto/asymmetric_keys/pkcs7_verify.c | 2 +- > crypto/asymmetric_keys/x509_public_key.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: James Morris -- James Morris