diff options
author | Vegard Nossum <vegard.nossum@oracle.com> | 2016-07-05 19:12:53 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-05 21:08:47 (GMT) |
commit | ab58298cf459fcd4f588a401d36abf0bd2215b51 (patch) | |
tree | 58c77416b58a2b50ff681d1e3fde2444d17fdc98 /lib/clz_ctz.c | |
parent | f5d6516120ee5c777fb7b1ba9d39031881ad511b (diff) | |
download | linux-ab58298cf459fcd4f588a401d36abf0bd2215b51.tar.xz |
net: fix decnet rtnexthop parsing
dn_fib_count_nhs() could enter an infinite loop if nhp->rtnh_len == 0
(i.e. if userspace passes a malformed netlink message).
Let's use the helpers from net/nexthop.h which take care of all this
stuff. We can do exactly the same as e.g. fib_count_nexthops() and
fib_get_nhs() from net/ipv4/fib_semantics.c.
This fixes the softlockup for me.
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/clz_ctz.c')
0 files changed, 0 insertions, 0 deletions