commit | 599f02195200133a278b689eb66b197b4a2c1e13 | [log] [tgz] |
---|---|---|
author | Jakub Kicinski <[email protected]> | Tue Feb 06 17:18:20 2024 -0800 |
committer | COS Cherry Picker <[email protected]> | Thu Mar 21 14:07:16 2024 -0700 |
tree | 36e428484ea1a401d86bd9ac701b631219d0faed | |
parent | 3265654063acb9af7a134735e634af0a1bbabb93 [diff] |
tls: fix race between tx work scheduling and socket close [ Upstream commit e01e3934a1b2d122919f73bc6ddbe1cdafc4bbdb ] Similarly to previous commit, the submitting thread (recvmsg/sendmsg) may exit as soon as the async crypto handler calls complete(). Reorder scheduling the work before calling complete(). This seems more logical in the first place, as it's the inverse order of what the submitting thread will do. BUG=b/326486141 TEST=presubmit RELEASE_NOTE=Fixed CVE-2024-26585 in the Linux kernel. cos-patch: security-high Reported-by: valis <[email protected]> Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Sabrina Dubroca <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 6db22d6c7a6dc914b12c0469b94eb639b6a8a146) Signed-off-by: Robert Kolchmeyer <[email protected]> Change-Id: Ia2d6c4605c4b3a7c88e669e5fdc7aea10cf857aa Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/66899 Reviewed-by: Oleksandr Tymoshenko <[email protected]> Main-Branch-Verified: Cusky Presubmit Bot <[email protected]> Tested-by: Cusky Presubmit Bot <[email protected]>