diff mbox

iproute2: 0 out memory for tc_skbedit struct prior to using it.

Message ID 20090127032028.26631.27015.stgit@lost.foo-projects.org
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Jeff Kirsher Jan. 27, 2009, 3:20 a.m. UTC
From: Alexander Duyck <alexander.h.duyck@intel.com>

A bug was found in which the memory for the tc_skbedit struct was being
used uninitialized to 0.  This patch corrects the issue by using a memset
to 0 out the memory of the structure.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 tc/m_skbedit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jeff Kirsher Feb. 10, 2009, 1:02 a.m. UTC | #1
Stephen - what is the status of this?
stephen hemminger Feb. 19, 2009, 5 p.m. UTC | #2
On Mon, 9 Feb 2009 17:02:48 -0800
Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote:

> Stephen - what is the status of this?
> 
Similar fix just applied
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
index 55e3f89..0e50fbc 100644
--- a/tc/m_skbedit.c
+++ b/tc/m_skbedit.c
@@ -57,6 +57,8 @@  parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
 	__u16 queue_mapping;
 	__u32 flags = 0, priority;
 
+	memset(&sel, 0, sizeof(struct tc_skbedit));
+
 	if (matches(*argv, "skbedit") != 0)
 		return -1;