[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZkeLXpcSralGavwL@hog>
Date: Fri, 17 May 2024 18:52:46 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
David Lebrun <david.lebrun@...ouvain.be>
Subject: Re: [PATCH net] ipv6: sr: fix memleak in seg6_hmac_init_algo
2024-05-17, 08:54:35 +0800, Hangbin Liu wrote:
> seg6_hmac_init_algo returns without cleaning up the previous allocations
> if one fails, so it's going to leak all that memory and the crypto tfms.
>
> Update seg6_hmac_exit to only free the memory when allocated, so we can
> reuse the code directly.
>
> Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
> Reported-by: Sabrina Dubroca <sd@...asysnail.net>
> Closes: https://lore.kernel.org/netdev/Zj3bh-gE7eT6V6aH@hog/
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
Reviewed-by: Sabrina Dubroca <sd@...asysnail.net>
Thanks Hangbin.
--
Sabrina
Powered by blists - more mailing lists