linux-hardened/net/ieee802154
Alexander Aring aeedebff69 ieee802154: 6lowpan: fix memory leak
Looking at current situation of memory management in 6lowpan receive
function I detected some invalid handling. After calling
lowpan_invoke_rx_handlers we will do a kfree_skb and then NET_RX_DROP on
error handling. We don't do this before, also on
skb_share_check/skb_unshare which might manipulate the reference
counters.

After running some 'grep -r "dev_add_pack" net/' to look how others
packet-layer receive callbacks works I detected that every subsystem do
a kfree_skb, then NET_RX_DROP without calling skb functions which
might manipulate the skb reference counters. This is the reason why we
should do the same here like all others subsystems. I didn't find any
documentation how the packet-layer receive callbacks handle NET_RX_DROP
return values either.

This patch will add a kfree_skb, then NET_RX_DROP handling for the
"trivial checks", in case of skb_share_check/skb_unshare the kfree_skb
call will be done inside these functions.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-10-22 12:24:42 +02:00
..
6lowpan ieee802154: 6lowpan: fix memory leak 2015-10-22 12:24:42 +02: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 ieee802154: add nl802154 framework 2014-11-09 19:50:29 +01:00
Kconfig nl802154: add support for security layer 2015-09-30 13:16:44 +02:00
Makefile ieee802154: Add trace events for rdev->ops 2015-04-30 18:48:09 +02:00
netlink.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
nl-mac.c ieee802154: Remove 802.15.4/6LoWPAN checks for interface MTU. 2015-05-26 20:26:09 +02:00
nl-phy.c mac802154: remove pib lock 2015-05-23 17:57:08 +02:00
nl802154.c nl802154: Missing return in nl802154_add_llsec_key() 2015-10-02 23:34:37 +02:00
nl802154.h ieee802154: add nl802154 framework 2014-11-09 19:50:29 +01:00
nl_policy.c ieee802154: mac802154: remove FSF address 2014-10-25 08:07:30 +02:00
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 cfg802154: add PM hooks 2015-07-23 17:10:49 +02:00
sysfs.h ieee802154: introduce sysfs file 2014-10-28 23:19:09 +01:00
trace.c ieee802154: Add trace events for rdev->ops 2015-04-30 18:48:09 +02:00
trace.h ieee802154: add ack request default handling 2015-08-10 20:43:06 +02:00