Skip to contentSkip to conversation

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

PATCH In review Jeff Kirsher 2 participants 3 messages Jan 27, 2009 – Feb 19, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Alexander Duyck <[email protected]>

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.

---

 tc/m_skbedit.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
tc/m_skbedit.c +2 -0
index 55e3f89..0e50fbc 100644
@@ -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;
 
#1 lore raw

Stephen - what is the status of this?

Signature · 2 lines
Cheers,
Jeff