From: Herbert Xu <herbert@gondor.apana.org.au>
To: Liwei Song <liwei.song@windriver.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
Gary Hook <gary.hook@amd.com>, David <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: ccp - zero the cmd data after use it
Date: Tue, 4 Aug 2020 14:04:20 +1000 [thread overview]
Message-ID: <20200804040420.GA10850@gondor.apana.org.au> (raw)
In-Reply-To: <87ae939b-4983-4e96-cc3d-1aa1d1b3d3ae@windriver.com>
On Tue, Aug 04, 2020 at 11:51:47AM +0800, Liwei Song wrote:
>
> On 8/3/20 20:52, Herbert Xu wrote:
> > On Mon, Aug 03, 2020 at 03:58:58PM +0800, Liwei Song wrote:
> >> exist the following assignment in ccp(ignore the force
> >> convert of the struct) by list_del in ccp_dequeue_cmd():
> >> req->__ctx->cmd->entry->next = LIST_POISON1;
> >>
> >> after use the req, kzfree(req) can not zero the entry
> >> entry->next = LIST_POISON1 of the ccp_cmd(cmd) struct
> >> when this address available as slub freelist pointer, this will cause
> >> the following "general protection fault" error if some process meet
> >> this LIST_POISON1 value address when request memory:
> >
> > Your description makes no sense. Please rewrite it and explain
> > the problem properly.
>
> The problem here is that the entry of struct ccp_cmd is not zeroed after we use it,
> If the other process got this address by kmalloc(), this illegal value "LIST_POISON1"
> will cause "general protection fault" error.
If that's the case surely the other process should be zeroing
the memory? Your explanation still makes no sense.
Thanks,
--
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
next prev parent reply other threads:[~2020-08-04 4:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 7:58 [PATCH] crypto: ccp - zero the cmd data after use it Liwei Song
2020-08-03 12:52 ` Herbert Xu
2020-08-04 3:51 ` Liwei Song
2020-08-04 4:04 ` Herbert Xu [this message]
2020-08-04 4:20 ` Liwei Song
2020-08-04 4:22 ` Herbert Xu
2020-08-04 4:43 ` Liwei Song
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=20200804040420.GA10850@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=gary.hook@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei.song@windriver.com \
--cc=thomas.lendacky@amd.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).