* pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
@ 2008-11-19 13:20 Patrick McHardy
2008-11-20 12:07 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2008-11-19 13:20 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 786 bytes --]
commit c870f95c8c5c40d2c38970246ed737b8264f0b0e
Author: Patrick McHardy <kaber@trash.net>
Date: Wed Nov 19 14:19:11 2008 +0100
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
nla_nest_start() might return NULL, causing a NULL pointer dereference.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 5bcef13..1ef25e6 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -422,6 +422,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab)
struct nlattr *nest;
nest = nla_nest_start(skb, TCA_STAB);
+ if (nest == NULL)
+ goto nla_put_failure;
NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts);
nla_nest_end(skb, nest);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
2008-11-19 13:20 pkt_sched: fix missing check for packet overrun in qdisc_dump_stab() Patrick McHardy
@ 2008-11-20 12:07 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-11-20 12:07 UTC (permalink / raw)
To: kaber; +Cc: netdev
From: Patrick McHardy <kaber@trash.net>
Date: Wed, 19 Nov 2008 14:20:51 +0100
> commit c870f95c8c5c40d2c38970246ed737b8264f0b0e
> Author: Patrick McHardy <kaber@trash.net>
> Date: Wed Nov 19 14:19:11 2008 +0100
>
> pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
>
> nla_nest_start() might return NULL, causing a NULL pointer dereference.
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-20 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 13:20 pkt_sched: fix missing check for packet overrun in qdisc_dump_stab() Patrick McHardy
2008-11-20 12:07 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).