]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: swap sk_write_space on close
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 10 Aug 2019 01:36:23 +0000 (18:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Aug 2019 02:55:22 +0000 (19:55 -0700)
commit8b82621e0d9417f0437242dd991d53f58230c012
tree293fcf87b9004d4fc8b4af374cebbe46c65f5bfd
parent23d38a5f0bf2d58a0c90fed1d289f41f9b5c87ff
net/tls: swap sk_write_space on close

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: 565c529f8860 ("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>
net/tls/tls_main.c