Skip to contentSkip to conversation

net_sched: info leak in atm_tc_dump_class()

PATCH In review Dan Carpenter 3 participants 3 messages Jul 30, 2013 – Jul 31, 2013

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

PATCH 1/1 net_sched: info leak in atm_tc_dump_class()

The "pvc" struct has a hole after pvc.sap_family which is not cleared.

net/sched/sch_atm.c +1 -0
index ca8e0a5..1f9c314 100644
@@ -605,6 +605,7 @@ static int atm_tc_dump_class(struct Qdisc *sch, unsigned long cl,
 		struct sockaddr_atmpvc pvc;
 		int state;
 
+		memset(&pvc, 0, sizeof(pvc));
 		pvc.sap_family = AF_ATMPVC;
 		pvc.sap_addr.itf = flow->vcc->dev ? flow->vcc->dev->number : -1;
 		pvc.sap_addr.vpi = flow->vcc->vpi;