patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Brian Dooley <brian.dooley@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: patch 'examples/ipsec-secgw: fix partial overflow' has been queued to stable release 21.11.6
Date: Thu,  7 Dec 2023 11:20:58 +0000	[thread overview]
Message-ID: <20231207112116.769502-6-ktraynor@redhat.com> (raw)
In-Reply-To: <20231207112116.769502-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/12/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e39929c86840f6941bd8274a41c2872916cd5ad9

Thanks.

Kevin

---
From e39929c86840f6941bd8274a41c2872916cd5ad9 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 15 Nov 2023 12:31:01 +0000
Subject: [PATCH] examples/ipsec-secgw: fix partial overflow

[ upstream commit ae9267a67e9030c1b069b0df69924aaca17683bb ]

Case of partial overflow detected with ASan.
Added extra padding to cdev_key structure.

This structure is used for the key in hash table.
Padding is added to force the struct to use 8 bytes,
to ensure memory is notread past this structs boundary
(the hash key calculation reads 8 bytes if this struct is size 5 bytes).
The padding should be zeroed.
If fields are modified in this struct, the padding must be updated to
ensure multiple of 8 bytes size overall.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
 examples/ipsec-secgw/ipsec.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index bc87b1a51d..080579c51a 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -233,4 +233,10 @@ struct ipsec_ctx {
 };
 
+/*
+ * This structure is used for the key in hash table.
+ * Padding is to force the struct to use 8 bytes,
+ * to ensure memory is not read past this structs boundary
+ * (hash key calculation reads 8 bytes if this struct is size 5 bytes).
+ */
 struct cdev_key {
 	uint16_t lcore_id;
@@ -238,4 +244,5 @@ struct cdev_key {
 	uint8_t auth_algo;
 	uint8_t aead_algo;
+	uint8_t padding[3]; /* padding to 8-byte size should be zeroed */
 };
 
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-07 11:18:59.775295940 +0000
+++ 0006-examples-ipsec-secgw-fix-partial-overflow.patch	2023-12-07 11:18:59.615873886 +0000
@@ -1 +1 @@
-From ae9267a67e9030c1b069b0df69924aaca17683bb Mon Sep 17 00:00:00 2001
+From e39929c86840f6941bd8274a41c2872916cd5ad9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ae9267a67e9030c1b069b0df69924aaca17683bb ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 5059418456..bdcada1c40 100644
+index bc87b1a51d..080579c51a 100644
@@ -29,2 +30,2 @@
-@@ -250,4 +250,10 @@ struct offloads {
- extern struct offloads tx_offloads;
+@@ -233,4 +233,10 @@ struct ipsec_ctx {
+ };
@@ -40 +41 @@
-@@ -255,4 +261,5 @@ struct cdev_key {
+@@ -238,4 +244,5 @@ struct cdev_key {


  parent reply	other threads:[~2023-12-07 11:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 11:20 patch 'net/txgbe: fix out of bound access' " Kevin Traynor
2023-12-07 11:20 ` patch 'doc: fix hns3 build option about max queue number' " Kevin Traynor
2023-12-07 11:20 ` patch 'doc: update features in hns3 guide' " Kevin Traynor
2023-12-07 11:20 ` patch 'doc: fix RSS flow description " Kevin Traynor
2023-12-07 11:20 ` patch 'doc: update versions recommendations for i40e and ice' " Kevin Traynor
2023-12-07 11:20 ` Kevin Traynor [this message]
2023-12-07 11:20 ` patch 'eal/windows: fix build with recent MinGW' " Kevin Traynor
2023-12-07 11:21 ` patch 'pdump: fix error number on IPC response' " Kevin Traynor
2023-12-07 11:21 ` patch 'app/dumpcap: allow multiple invocations' " Kevin Traynor
2023-12-07 11:21 ` patch 'examples/ethtool: fix pause configuration' " Kevin Traynor
2023-12-07 11:21 ` patch 'test/hash: fix creation error log' " Kevin Traynor
2023-12-07 11:21 ` patch 'app/pipeline: add sigint handler' " Kevin Traynor
2023-12-07 11:21 ` patch 'doc: remove restriction on ixgbe vector support' " Kevin Traynor
2023-12-07 11:21 ` patch 'doc: fix some ordered lists' " Kevin Traynor
2023-12-07 11:21 ` patch 'doc: remove number of commands in vDPA guide' " Kevin Traynor
2023-12-07 11:21 ` patch 'mempool: fix get function documentation' " Kevin Traynor
2023-12-07 11:21 ` patch 'mempool: clarify enqueue/dequeue ops " Kevin Traynor
2023-12-07 11:21 ` patch 'ethdev: fix ESP packet type description' " Kevin Traynor
2023-12-07 11:21 ` patch 'net/hns3: fix ignored reset event' " Kevin Traynor
2023-12-07 11:21 ` patch 'net/hns3: fix reset event status' " Kevin Traynor
2023-12-07 11:21 ` patch 'net/hns3: fix VF reset handler interruption' " Kevin Traynor
2023-12-07 11:21 ` patch 'net/af_xdp: make compatible with libbpf 0.8.0' " Kevin Traynor
2023-12-07 14:16   ` Kevin Traynor
2023-12-11 12:44     ` Loftus, Ciara
2023-12-11 15:27       ` Kevin Traynor

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=20231207112116.769502-6-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=brian.dooley@intel.com \
    --cc=stable@dpdk.org \
    /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).