]> Git Repo - J-linux.git/commitdiff
mac802154: Fix possible double free upon parsing error
authorMiquel Raynal <[email protected]>
Fri, 16 Dec 2022 23:57:42 +0000 (00:57 +0100)
committerStefan Schmidt <[email protected]>
Mon, 19 Dec 2022 10:38:12 +0000 (11:38 +0100)
Commit 4d1c7d87030b ("mac802154: Move an skb free within the rx path")
tried to simplify error handling within the receive path by moving the
kfree_skb() call at the very end of the top-level function but missed
one kfree_skb() called upon frame parsing error. Prevent this possible
double free from happening.

Fixes: 4d1c7d87030b ("mac802154: Move an skb free within the rx path")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stefan Schmidt <[email protected]>
net/mac802154/rx.c

index c2aae2a6d6a6ba98b5513980f8ee97946cde0810..97bb4401dd3ee2bc3e3171aafb0d0844ffb81c06 100644 (file)
@@ -213,7 +213,6 @@ __ieee802154_rx_handle_packet(struct ieee802154_local *local,
        ret = ieee802154_parse_frame_start(skb, &hdr);
        if (ret) {
                pr_debug("got invalid frame\n");
-               kfree_skb(skb);
                return;
        }
 
This page took 0.045213 seconds and 4 git commands to generate.