All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] net_sched: stack info leak in cbq_dump_wrr()
@ 2013-07-29 19:36 ` Dan Carpenter
  0 siblings, 0 replies; 22+ messages in thread
From: Dan Carpenter @ 2013-07-29 19:36 UTC (permalink / raw)
  To: Jamal Hadi Salim; +Cc: David S. Miller, netdev, kernel-janitors

opt.__reserved isn't cleared so we leak a byte of stack information.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 71a5688..6398a61 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1469,6 +1469,7 @@ static int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl)
 	opt.allot = cl->allot;
 	opt.priority = cl->priority + 1;
 	opt.cpriority = cl->cpriority + 1;
+	opt.__reserved = 0;
 	opt.weight = cl->weight;
 	if (nla_put(skb, TCA_CBQ_WRROPT, sizeof(opt), &opt))
 		goto nla_put_failure;

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

end of thread, other threads:[~2013-07-30 10:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29 19:36 [patch] net_sched: stack info leak in cbq_dump_wrr() Dan Carpenter
2013-07-29 19:36 ` Dan Carpenter
2013-07-29 19:44 ` Joe Perches
2013-07-29 19:44   ` Joe Perches
2013-07-29 20:01   ` Dan Carpenter
2013-07-29 20:01     ` Dan Carpenter
2013-07-29 20:12     ` Joe Perches
2013-07-29 20:12       ` Joe Perches
2013-07-29 21:17       ` David Miller
2013-07-29 21:17         ` David Miller
2013-07-29 21:50         ` Joe Perches
2013-07-29 21:50           ` Joe Perches
2013-07-30  6:55       ` Dan Carpenter
2013-07-30  6:55         ` Dan Carpenter
2013-07-30  7:12         ` Joe Perches
2013-07-30  7:12           ` Joe Perches
2013-07-30  7:18           ` David Miller
2013-07-30  7:18             ` David Miller
2013-07-30 10:18             ` walter harms
2013-07-30 10:18               ` walter harms
2013-07-29 21:20 ` Jiri Pirko
2013-07-29 21:20   ` Jiri Pirko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.