]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ipv6: rpl_iptunnel: Fix memory leak in rpl_input
authorJustin Iurman <justin.iurman@uliege.be>
Wed, 11 Sep 2024 17:45:57 +0000 (19:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:47 +0000 (15:10 +0200)
commit1ee3ffd8600aa9e3272f1d82f36c8ed6dc58ccc7
tree58ed705425f6433a4607aa74ec952e48adaca0b3
parent613dad98a8c84eabe7ed9edfe04e0c2c951e2b8c
net: ipv6: rpl_iptunnel: Fix memory leak in rpl_input

[ Upstream commit 2c84b0aa28b9e73e8c4b4ce038269469434ae372 ]

Free the skb before returning from rpl_input when skb_cow_head() fails.
Use a "drop" label and goto instructions.

Fixes: a7a29f9c361f ("net: ipv6: add rpl sr tunnel")
Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240911174557.11536-1-justin.iurman@uliege.be
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/rpl_iptunnel.c