mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net/tls: swap sk_write_space on close
[ Upstream commit57c722e932] Now that we swap the original proto and clear the ULP pointer on close we have to make sure no callback will try to access the freed state. sk_write_space is not part of sk_prot, remember to swap it. Reported-by: syzbot+dcdc9deefaec44785f32@syzkaller.appspotmail.com Fixes:95fa145479("bpf: sockmap/tls, close can race with map free") Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f7009bbaff
commit
fdc4400e96
@@ -301,6 +301,7 @@ static void tls_sk_proto_close(struct sock *sk, long timeout)
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
sk->sk_write_space = ctx->sk_write_space;
|
||||
tls_ctx_free(ctx);
|
||||
ctx = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user