DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session
@ 2020-10-06  9:42 David Coyle
  2020-10-06 11:08 ` De Lara Guarch, Pablo
  2020-10-06 11:40 ` [dpdk-dev] [PATCH v2] " David Coyle
  0 siblings, 2 replies; 5+ messages in thread
From: David Coyle @ 2020-10-06  9:42 UTC (permalink / raw)
  To: pablo.de.lara.guarch, declan.doherty; +Cc: dev, akhil.goyal, David Coyle

When destroying a security session, the AESNI-MB PMD attempted to clear
the private aesni_mb session object to remove any key material. However,
the function aesni_mb_pmd_sec_sess_destroy() cleared the security session
object instead of the private session object.

This patch fixes this issue by now clearing the private session object.

Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 2362f0c3c..b11d7f12b 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -911,7 +911,7 @@ aesni_mb_pmd_sec_sess_destroy(void *dev __rte_unused,
 
 	if (sess_priv) {
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		memset(sess, 0, sizeof(struct aesni_mb_session));
+		memset(sess_priv, 0, sizeof(struct aesni_mb_session));
 		set_sec_session_private_data(sess, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session
  2020-10-06  9:42 [dpdk-dev] [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session David Coyle
@ 2020-10-06 11:08 ` De Lara Guarch, Pablo
  2020-10-06 11:43   ` Coyle, David
  2020-10-06 11:40 ` [dpdk-dev] [PATCH v2] " David Coyle
  1 sibling, 1 reply; 5+ messages in thread
From: De Lara Guarch, Pablo @ 2020-10-06 11:08 UTC (permalink / raw)
  To: Coyle, David, Doherty, Declan; +Cc: dev, akhil.goyal

Hi David,


> -----Original Message-----
> From: Coyle, David <david.coyle@intel.com>
> Sent: Tuesday, October 6, 2020 10:42 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; akhil.goyal@nxp.com; Coyle, David
> <david.coyle@intel.com>
> Subject: [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session
> 
> When destroying a security session, the AESNI-MB PMD attempted to clear the
> private aesni_mb session object to remove any key material. However, the
> function aesni_mb_pmd_sec_sess_destroy() cleared the security session object
> instead of the private session object.
> 
> This patch fixes this issue by now clearing the private session object.
> 
> Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")
> 
> Signed-off-by: David Coyle <david.coyle@intel.com>

Patch looks good, but you need to CC stable, as this should be backported since the issue was introduced in the previous release.
So, add Cc: stable@dpdk.org after Fixes: fda... and send a v2.
Apart from that, you can keep my ack:

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] crypto/aesni_mb: fix incorrect clearing of security session
  2020-10-06  9:42 [dpdk-dev] [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session David Coyle
  2020-10-06 11:08 ` De Lara Guarch, Pablo
@ 2020-10-06 11:40 ` David Coyle
  2020-10-09 19:31   ` Akhil Goyal
  1 sibling, 1 reply; 5+ messages in thread
From: David Coyle @ 2020-10-06 11:40 UTC (permalink / raw)
  To: pablo.de.lara.guarch, declan.doherty
  Cc: dev, akhil.goyal, David Coyle, stable

When destroying a security session, the AESNI-MB PMD attempted to clear
the private aesni_mb session object to remove any key material. However,
the function aesni_mb_pmd_sec_sess_destroy() cleared the security session
object instead of the private session object.

This patch fixes this issue by now clearing the private session object.

Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")
Cc: stable@dpdk.org

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
v2:
* CC'ing stable@dpdk.org

 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 2362f0c3c..b11d7f12b 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -911,7 +911,7 @@ aesni_mb_pmd_sec_sess_destroy(void *dev __rte_unused,
 
 	if (sess_priv) {
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		memset(sess, 0, sizeof(struct aesni_mb_session));
+		memset(sess_priv, 0, sizeof(struct aesni_mb_session));
 		set_sec_session_private_data(sess, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session
  2020-10-06 11:08 ` De Lara Guarch, Pablo
@ 2020-10-06 11:43   ` Coyle, David
  0 siblings, 0 replies; 5+ messages in thread
From: Coyle, David @ 2020-10-06 11:43 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, akhil.goyal

Hi Pablo

> >
> > When destroying a security session, the AESNI-MB PMD attempted to
> > clear the private aesni_mb session object to remove any key material.
> > However, the function aesni_mb_pmd_sec_sess_destroy() cleared the
> > security session object instead of the private session object.
> >
> > This patch fixes this issue by now clearing the private session object.
> >
> > Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")
> >
> > Signed-off-by: David Coyle <david.coyle@intel.com>
> 
> Patch looks good, but you need to CC stable, as this should be backported
> since the issue was introduced in the previous release.
> So, add Cc: stable@dpdk.org after Fixes: fda... and send a v2.
> Apart from that, you can keep my ack:

[DC] Done, thanks for pointing that out

> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] crypto/aesni_mb: fix incorrect clearing of security session
  2020-10-06 11:40 ` [dpdk-dev] [PATCH v2] " David Coyle
@ 2020-10-09 19:31   ` Akhil Goyal
  0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2020-10-09 19:31 UTC (permalink / raw)
  To: David Coyle, pablo.de.lara.guarch, declan.doherty; +Cc: dev, stable

> When destroying a security session, the AESNI-MB PMD attempted to clear
> the private aesni_mb session object to remove any key material. However,
> the function aesni_mb_pmd_sec_sess_destroy() cleared the security session
> object instead of the private session object.
> 
> This patch fixes this issue by now clearing the private session object.
> 
> Fixes: fda5216fba55 ("crypto/aesni_mb: support DOCSIS protocol")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Coyle <david.coyle@intel.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
Applied to dpdk-next-crypto

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-09 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06  9:42 [dpdk-dev] [PATCH v1] crypto/aesni_mb: fix incorrect clearing of security session David Coyle
2020-10-06 11:08 ` De Lara Guarch, Pablo
2020-10-06 11:43   ` Coyle, David
2020-10-06 11:40 ` [dpdk-dev] [PATCH v2] " David Coyle
2020-10-09 19:31   ` Akhil Goyal

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git