diff options
author | Hyunwoo Kim <v4bel@theori.io> | 2024-04-22 12:33:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-02 17:35:17 +0300 |
commit | ca4fb6c6764b3f75b4f5aa81db1536291897ff7f (patch) | |
tree | 73252137741f780786e8c4b842ab465215566d90 /drivers | |
parent | 2d03fbbc288463958e0ac803da50a7e3033f1e2e (diff) | |
download | linux-ca4fb6c6764b3f75b4f5aa81db1536291897ff7f.tar.xz |
tcp: Fix Use-After-Free in tcp_ao_connect_init
[ Upstream commit 80e679b352c3ce5158f3f778cfb77eb767e586fb ]
Since call_rcu, which is called in the hlist_for_each_entry_rcu traversal
of tcp_ao_connect_init, is not part of the RCU read critical section, it
is possible that the RCU grace period will pass during the traversal and
the key will be free.
To prevent this, it should be changed to hlist_for_each_entry_safe.
Fixes: 7c2ffaf21bd6 ("net/tcp: Calculate TCP-AO traffic keys")
Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Dmitry Safonov <0x7f454c46@gmail.com>
Link: https://lore.kernel.org/r/ZiYu9NJ/ClR8uSkH@v4bel-B760M-AORUS-ELITE-AX
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions