diff options
author | Gao Feng <gfree.wind@vip.163.com> | 2017-06-28 12:53:54 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-29 12:55:12 -0400 |
commit | c1a4872ebfb83b1af7144f7b29ac8c4b344a12a8 (patch) | |
tree | bfd7474b87652f2ddbe4f2d6583fe081ebdb0c35 /kernel | |
parent | 713a98d90c5ea072c1bb00ef40617aee2cef2232 (diff) |
net: sched: Fix one possible panic when no destroy callback
When qdisc fail to init, qdisc_create would invoke the destroy callback
to cleanup. But there is no check if the callback exists really. So it
would cause the panic if there is no real destroy callback like the qdisc
codel, fq, and so on.
Take codel as an example following:
When a malicious user constructs one invalid netlink msg, it would cause
codel_init->codel_change->nla_parse_nested failed.
Then kernel would invoke the destroy callback directly but qdisc codel
doesn't define one. It causes one panic as a result.
Now add one the check for destroy to avoid the possible panic.
Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation")
Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions