tee: optee: prevent use-after-free when the client exits before the supplicant
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.259, 5.15.210, 6.1.176, 6.6.143, 6.12.94, and 4 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: tee: optee: prevent use-after-free when the client exits before the supplicant Commit 70b0d6b0a199 ("tee: optee: Fix supplicant wait loop") made the client wait as killable so it can be interrupted during shutdown or after a supplicant crash. This changes the original lifetime expectations: the client task can now terminate while the supplicant is still processing its request. If the client exits first it removes the request from its queue and kfree()s it, while the request ID remains in supp->idr. A subsequent lookup on the supplicant path then dereferences freed memory, leading to a use-after-free. Serialise access to the request with supp->mutex: • Hold supp->mutex in optee_supp_recv() and optee_supp_send() while looking up and touching the request. • Let optee_supp_thrd_req() notice that the client has terminated and signal optee_supp_send() accordingly. With these changes the request cannot be freed while the supplicant still has a reference, eliminating the race.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 0180cf0373f84fff61b16f8c062553a13dd7cfca · fixed in 416259cb5bffecaaae5f76539deb535a8c1b2c34; From c0a9a948159153be145f9471435695373904ee6d · fixed in 724d0caffd4204b46f78efe22f18f8338031c6e1; From ec18520f5edc20a00c34a8c9fdd6507c355e880f · fixed in ae847ab29ded2d7cece4d5970f0edefa4137bf2f; From d61cc1a435e6894bfb0dd3370c6f765d2d12825d · fixed in 9a0dc9279d0907b198f205a693aedf696b08145d; From fd9d2d6124c293e40797a080adf8a9c237efd8b8 · fixed in d366a01475f927402c96a3fe78bfc06b924fc87d; From 70b0d6b0a199c5a3ee6c72f5e61681ed6f759612 · fixed in d5b57bb314d79e99bebb58a53588fa11dd4dbf69; From 70b0d6b0a199c5a3ee6c72f5e61681ed6f759612 · fixed in 373152c94e57e9592b68c100e224fbd943cfd608; From 70b0d6b0a199c5a3ee6c72f5e61681ed6f759612 · fixed in 387a926ee166814611acecb960207fe2f3c4fd3e; From 5.10.235 · fixed in 5.10.259; From 5.15.179 · fixed in 5.15.210; From 6.1.130 · fixed in 6.1.176; From 6.6.80 · fixed in 6.6.143; From 6.12.17 · fixed in 6.12.94; From 5.4.291 · fixed in 5.5; From 6.13.5 · fixed in 6.14
- Linux Linux
6.14
- KernelLinux
fixed in 5.10.259; From 5.11.0 · fixed in 5.15.210; From 5.16.0 · fixed in 6.1.176; From 6.2.0 · fixed in 6.6.143; From 6.7.0 · fixed in 6.12.94; From 6.13.0 · fixed in 6.18.36; From 6.14.0 · fixed in 7.0.13
References 8
git.kernel.org
- stable/c/416259cb5bffecaaae5f76539deb535a8c1b2c34
- stable/c/724d0caffd4204b46f78efe22f18f8338031c6e1
- stable/c/ae847ab29ded2d7cece4d5970f0edefa4137bf2f
- stable/c/9a0dc9279d0907b198f205a693aedf696b08145d
- stable/c/d366a01475f927402c96a3fe78bfc06b924fc87d
- stable/c/d5b57bb314d79e99bebb58a53588fa11dd4dbf69
- stable/c/373152c94e57e9592b68c100e224fbd943cfd608
- stable/c/387a926ee166814611acecb960207fe2f3c4fd3e