Keyrings Archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: kernel test robot <oliver.sang@intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-crypto@vger.kernel.org, keyrings@vger.kernel.org
Subject: [PATCH] crypto: akcipher - Set request tfm on sync path
Date: Mon, 26 Jun 2023 18:20:25 +0800	[thread overview]
Message-ID: <ZJlmaarLRYZcs+c3@gondor.apana.org.au> (raw)
In-Reply-To: <202306261421.2ac744fa-oliver.sang@intel.com>

On Mon, Jun 26, 2023 at 03:07:01PM +0800, kernel test robot wrote:
>
> [    7.727242][    T1] cfg80211: Loading compiled-in X.509 certificates for regulatory database
> [    7.737831][    T1] BUG: kernel NULL pointer dereference, address: 00000010
> [    7.739122][    T1] #PF: supervisor read access in kernel mode
> [    7.740125][    T1] #PF: error_code(0x0000) - not-present page
> [    7.741135][    T1] *pdpt = 0000000000000000 *pde = f000ff53f000ff53
> [    7.742337][    T1] Oops: 0000 [#1]
> [    7.742986][    T1] CPU: 0 PID: 1 Comm: swapper Tainted: G S                 6.4.0-rc1-00077-g63ba4d67594a #2
> [    7.744804][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [    7.746660][    T1] EIP: crypto_sig_verify+0x82/0xa4

---8<---
The request tfm needs to be set.

Fixes: addde1f2c966 ("crypto: akcipher - Add sync interface without SG lists")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202306261421.2ac744fa-oliver.sang@intel.com

diff --git a/crypto/akcipher.c b/crypto/akcipher.c
index 152cfba1346c..8ffd31c44cf6 100644
--- a/crypto/akcipher.c
+++ b/crypto/akcipher.c
@@ -207,6 +207,7 @@ int crypto_akcipher_sync_prep(struct crypto_akcipher_sync_data *data)
 		return -ENOMEM;
 
 	data->req = req;
+	akcipher_request_set_tfm(req, data->tfm);
 
 	buf = (u8 *)(req + 1) + reqsize;
 	data->buf = buf;
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

           reply	other threads:[~2023-06-26 10:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <202306261421.2ac744fa-oliver.sang@intel.com>]

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=ZJlmaarLRYZcs+c3@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).