diff mbox series

[wpan,02/17] net: ieee802154: fix memory leak when deliver monitor skbs

Message ID 20210228151817.95700-3-aahringo@redhat.com
State New
Headers show
Series ieee802154: syzbot fixes | expand

Commit Message

Alexander Aring Feb. 28, 2021, 3:18 p.m. UTC
This patch adds a missing consume_skb() when deliver a skb to upper
monitor interfaces of a wpan phy.

Reported-by: syzbot+44b651863a17760a893b@syzkaller.appspotmail.com
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 net/mac802154/rx.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alexander Aring March 1, 2021, 3:16 a.m. UTC | #1
Hi Stefan,

On Sun, 28 Feb 2021 at 10:21, Alexander Aring <aahringo@redhat.com> wrote:
>
> This patch adds a missing consume_skb() when deliver a skb to upper
> monitor interfaces of a wpan phy.
>
> Reported-by: syzbot+44b651863a17760a893b@syzkaller.appspotmail.com
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
> ---
>  net/mac802154/rx.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
> index b8ce84618a55..18abc1f49323 100644
> --- a/net/mac802154/rx.c
> +++ b/net/mac802154/rx.c
> @@ -244,6 +244,8 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
>                         sdata->dev->stats.rx_bytes += skb->len;
>                 }
>         }
> +
> +       consume_skb(skb);

Please drop this patch. It's not correct. I will look next weekend at
this one again.
The other patches should be fine, I hope.

- Alex
diff mbox series

Patch

diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index b8ce84618a55..18abc1f49323 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -244,6 +244,8 @@  ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
 			sdata->dev->stats.rx_bytes += skb->len;
 		}
 	}
+
+	consume_skb(skb);
 }
 
 void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb)