Skip to content
Commit 49c47cc2 authored by Hangyu Hua's avatar Hangyu Hua Committed by Jakub Kicinski
Browse files

net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf()

ctx->crypto_send.info is not protected by lock_sock in
do_tls_getsockopt_conf(). A race condition between do_tls_getsockopt_conf()
and error paths of do_tls_setsockopt_conf() may lead to a use-after-free
or null-deref.

More discussion:  https://lore.kernel.org/all/Y/ht6gQL+u6fj3dG@hog/



Fixes: 3c4d7559 ("tls: kernel TLS support")
Signed-off-by: default avatarHangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20230228023344.9623-1-hbh25y@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 81563d85
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment