From: Dan Carpenter <dan.carpenter@linaro.org>
To: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@datenfreihafen.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Angus Chen <angus.chen@jaguarmicro.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Joel Granados <joel.granados@gmail.com>,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH net] 6lowpan: fix double free in lowpan_frag_rcv()
Date: Wed, 4 Oct 2023 12:22:02 +0300 [thread overview]
Message-ID: <3c91e145-5cd5-4d9d-9590-3b74b811436a@moroto.mountain> (raw)
The skb() is freed by the caller in lowpan_invoke_rx_handlers() so this
free is a double free.
Fixes: 7240cdec60b1 ("6lowpan: handling 6lowpan fragmentation via inet_frag api")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
From static analysis, untested.
net/ieee802154/6lowpan/reassembly.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
index 6dd960ec558c..1ccefc07049c 100644
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -313,7 +313,6 @@ int lowpan_frag_rcv(struct sk_buff *skb, u8 frag_type)
}
err:
- kfree_skb(skb);
return -1;
}
--
2.39.2
next reply other threads:[~2023-10-04 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 9:22 Dan Carpenter [this message]
2023-10-05 22:10 ` [PATCH net] 6lowpan: fix double free in lowpan_frag_rcv() Alexander Aring
2023-10-06 4:07 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c91e145-5cd5-4d9d-9590-3b74b811436a@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=alex.aring@gmail.com \
--cc=angus.chen@jaguarmicro.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joel.granados@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stefan@datenfreihafen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).