]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels
authorJakub Kicinski <kuba@kernel.org>
Thu, 30 Jan 2025 03:15:18 +0000 (19:15 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:51:13 +0000 (12:51 +0100)
commitbf500b0d0cfe92ee62dfd4c2ace7f6353cf3a4c8
tree5a734420d26c49a83e881aaa606ad6cf64c32e53
parent02e43735932d4b5eab0309acc92d8a2d19ca2ce5
net: ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels

commit c71a192976ded2f2f416d03c4f595cdd4478b825 upstream.

dst_cache_get() gives us a reference, we need to release it.

Discovered by the ioam6.sh test, kmemleak was recently fixed
to catch per-cpu memory leaks.

Fixes: 985ec6f5e623 ("net: ipv6: rpl_iptunnel: mitigate 2-realloc issue")
Fixes: 40475b63761a ("net: ipv6: seg6_iptunnel: mitigate 2-realloc issue")
Fixes: dce525185bc9 ("net: ipv6: ioam6_iptunnel: mitigate 2-realloc issue")
Reviewed-by: Justin Iurman <justin.iurman@uliege.be>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250130031519.2716843-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/rpl_iptunnel.c
net/ipv6/seg6_iptunnel.c