projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7f65d1
)
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
author
Patrick McHardy
<kaber@trash.net>
Thu, 20 Nov 2008 12:07:14 +0000
(
04:07
-0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 20 Nov 2008 12:07:14 +0000
(
04:07
-0800)
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>
net/sched/sch_api.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sched/sch_api.c
b/net/sched/sch_api.c
index b16ad2972c6b527dc2013a5dfb4108ad35ef8197..6ab4a2f92ca0b390849547e8e93f99b07e6d4a6b 100644
(file)
--- 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);