[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130729212033.GB6386@minipsycho.orion>
Date: Mon, 29 Jul 2013 23:20:33 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [patch] net_sched: stack info leak in cbq_dump_wrr()
Mon, Jul 29, 2013 at 09:36:51PM CEST, dan.carpenter@...cle.com wrote:
>opt.__reserved isn't cleared so we leak a byte of stack information.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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;
There's probably better to zero whole opt at the beginning of the function.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists