diff options
author | Patrick McHardy <kaber@trash.net> | 2008-11-20 04:07:14 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 04:07:14 -0800 |
commit | 3aa4614da741f10b09559a5675c79e2eff5cccd8 (patch) | |
tree | 0181c697123716bf574e7819854d373dc6ee18b8 /net | |
parent | f7f65d1e8bfaa92c1a419c2a52faeca835659295 (diff) | |
download | op-kernel-dev-3aa4614da741f10b09559a5675c79e2eff5cccd8.zip op-kernel-dev-3aa4614da741f10b09559a5675c79e2eff5cccd8.tar.gz |
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/sch_api.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b16ad29..6ab4a2f 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -417,6 +417,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); |