linux/net/ieee802154
Eric Dumazet 1d6119baf0 net: fix percpu memory leaks
This patch fixes following problems :

1) percpu_counter_init() can return an error, therefore
  init_frag_mem_limit() must propagate this error so that
  inet_frags_init_net() can do the same up to its callers.

2) If ip[46]_frags_ns_ctl_register() fail, we must unwind
   properly and free the percpu_counter.

Without this fix, we leave freed object in percpu_counters
global list (if CONFIG_HOTPLUG_CPU) leading to crashes.

This bug was detected by KASAN and syzkaller tool
(http://github.com/google/syzkaller)

Fixes: 6d7b857d54 ("net: use lib/percpu_counter API for fragmentation mem accounting")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02 22:47:14 -05:00
..
6lowpan net: fix percpu memory leaks 2015-11-02 22:47:14 -05:00
core.c nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
core.h nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
header_ops.c ieee802154: change needed headroom/tailroom 2015-09-22 11:51:20 +02:00
ieee802154.h
Kconfig nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
Makefile
netlink.c
nl802154.c nl802154: Missing return in nl802154_add_llsec_key() 2015-10-02 23:34:37 +02:00
nl802154.h
nl_policy.c
nl-mac.c
nl-phy.c
rdev-ops.h nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
socket.c ieee802154: change mtu size behaviour 2015-09-30 13:21:32 +02:00
sysfs.c
sysfs.h
trace.c
trace.h ieee802154: add ack request default handling 2015-08-10 20:43:06 +02:00