* [PATCH net] net/tcp_ao: Don't leak ao_info on error-path
@ 2024-06-19 0:29 Dmitry Safonov via B4 Relay
2024-06-19 15:19 ` Eric Dumazet
2024-06-20 0:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Safonov via B4 Relay @ 2024-06-19 0:29 UTC (permalink / raw)
To: Eric Dumazet, David S. Miller, David Ahern, Jakub Kicinski,
Paolo Abeni
Cc: netdev, linux-kernel, stable, Dmitry Safonov
From: Dmitry Safonov <0x7f454c46@gmail.com>
It seems I introduced it together with TCP_AO_CMDF_AO_REQUIRED, on
version 5 [1] of TCP-AO patches. Quite frustrative that having all these
selftests that I've written, running kmemtest & kcov was always in todo.
[1]: https://lore.kernel.org/netdev/20230215183335.800122-5-dima@arista.com/
Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/20240617072451.1403e1d2@kernel.org/
Fixes: 0aadc73995d0 ("net/tcp: Prevent TCP-MD5 with TCP-AO being set")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
---
net/ipv4/tcp_ao.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c
index 37c42b63ff99..09c0fa6756b7 100644
--- a/net/ipv4/tcp_ao.c
+++ b/net/ipv4/tcp_ao.c
@@ -1968,8 +1968,10 @@ static int tcp_ao_info_cmd(struct sock *sk, unsigned short int family,
first = true;
}
- if (cmd.ao_required && tcp_ao_required_verify(sk))
- return -EKEYREJECTED;
+ if (cmd.ao_required && tcp_ao_required_verify(sk)) {
+ err = -EKEYREJECTED;
+ goto out;
+ }
/* For sockets in TCP_CLOSED it's possible set keys that aren't
* matching the future peer (address/port/VRF/etc),
---
base-commit: 92e5605a199efbaee59fb19e15d6cc2103a04ec2
change-id: 20240619-tcp-ao-required-leak-22b4a9b6d743
Best regards,
--
Dmitry Safonov <0x7f454c46@gmail.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] net/tcp_ao: Don't leak ao_info on error-path
2024-06-19 0:29 [PATCH net] net/tcp_ao: Don't leak ao_info on error-path Dmitry Safonov via B4 Relay
@ 2024-06-19 15:19 ` Eric Dumazet
2024-06-20 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-06-19 15:19 UTC (permalink / raw)
To: 0x7f454c46
Cc: David S. Miller, David Ahern, Jakub Kicinski, Paolo Abeni, netdev,
linux-kernel, stable
On Wed, Jun 19, 2024 at 2:29 AM Dmitry Safonov via B4 Relay
<devnull+0x7f454c46.gmail.com@kernel.org> wrote:
>
> From: Dmitry Safonov <0x7f454c46@gmail.com>
>
> It seems I introduced it together with TCP_AO_CMDF_AO_REQUIRED, on
> version 5 [1] of TCP-AO patches. Quite frustrative that having all these
> selftests that I've written, running kmemtest & kcov was always in todo.
>
> [1]: https://lore.kernel.org/netdev/20230215183335.800122-5-dima@arista.com/
>
> Reported-by: Jakub Kicinski <kuba@kernel.org>
> Closes: https://lore.kernel.org/netdev/20240617072451.1403e1d2@kernel.org/
> Fixes: 0aadc73995d0 ("net/tcp: Prevent TCP-MD5 with TCP-AO being set")
> Cc: stable@vger.kernel.org
> Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] net/tcp_ao: Don't leak ao_info on error-path
2024-06-19 0:29 [PATCH net] net/tcp_ao: Don't leak ao_info on error-path Dmitry Safonov via B4 Relay
2024-06-19 15:19 ` Eric Dumazet
@ 2024-06-20 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-20 0:40 UTC (permalink / raw)
To: Dmitry Safonov via B4 Relay
Cc: edumazet, davem, dsahern, kuba, pabeni, netdev, linux-kernel,
stable, 0x7f454c46
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 19 Jun 2024 01:29:04 +0100 you wrote:
> From: Dmitry Safonov <0x7f454c46@gmail.com>
>
> It seems I introduced it together with TCP_AO_CMDF_AO_REQUIRED, on
> version 5 [1] of TCP-AO patches. Quite frustrative that having all these
> selftests that I've written, running kmemtest & kcov was always in todo.
>
> [1]: https://lore.kernel.org/netdev/20230215183335.800122-5-dima@arista.com/
>
> [...]
Here is the summary with links:
- [net] net/tcp_ao: Don't leak ao_info on error-path
https://git.kernel.org/netdev/net/c/f9ae84890428
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-20 0:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 0:29 [PATCH net] net/tcp_ao: Don't leak ao_info on error-path Dmitry Safonov via B4 Relay
2024-06-19 15:19 ` Eric Dumazet
2024-06-20 0:40 ` patchwork-bot+netdevbpf
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 NNTP newsgroup(s).