Bug 1220185 (CVE-2024-26583)

Summary: VUL-0: CVE-2024-26583: kernel: tls: fix race between async notify and socket close
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Michal Kubeček <mkubecek>
Status: IN_PROGRESS --- QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: gabriele.sonnu, hare, jlee, mhocko, mkoutny
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/394737/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-26583:5.1:(AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-02-22 09:00:45 UTC
In the Linux kernel, the following vulnerability has been resolved:

tls: fix race between async notify and socket close

The submitting thread (one which called recvmsg/sendmsg)
may exit as soon as the async crypto handler calls complete()
so any code past that point risks touching already freed data.

Try to avoid the locking and extra flags altogether.
Have the main thread hold an extra reference, this way
we can depend solely on the atomic ref counter for
synchronization.

Don't futz with reiniting the completion, either, we are now
tightly controlling when completion fires.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-26583
https://www.cve.org/CVERecord?id=CVE-2024-26583
https://git.kernel.org/stable/c/aec7961916f3f9e88766e2688992da6980f11b8d
Comment 1 Gabriele Sonnu 2024-02-22 13:27:34 UTC
Offending commit found in:

- SLE15-SP4
- SLE15-SP5
- SLE15-SP6
- cve/linux-5.3
- stable 

Fixing commit:

https://git.kernel.org/stable/c/aec7961916f3f9e88766e2688992da6980f11b8d