CVE-2023-52503·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: tee: amdtee: fix use-after-free vulnerability in amdtee_close_session There is a potential race condition in amdtee_close_session that may cause use-after-free in amdtee_open_session. For instance, if a session has refcount == 1, and one thread tries to free this session via: kref_put(&sess->refcount, destroy_session); the reference count will get decremented, and the next step would be to call destroy_session(). However, if in another thread, amdtee_open_session() is called before destroy_session() has completed execution, alloc_session() may return 'sess' that will be freed up later in destroy_session() leading to use-after-free in amdtee_open_session. To fix this issue, treat decrement of sess->refcount and removal of 'sess' from session list in destroy_session() as a critical section, so that it is executed atomically.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.5.8
- Published
- 2024-03-02
Affected versions
From: 6.2
Until: 6.5.8
Fixed in: 6.5.8
How to fix this CVE
Update your Linux kernel to version 6.5.8 or later to patch a race condition in AMD TEE session management that could lead to use-after-free memory corruption. Systems running kernel versions 6.2 through 6.5.7 should prioritize this update, as the vulnerability affects the trusted execution environment driver and requires local access to exploit.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check your current kernel version and confirm if it falls in the 6.2-6.5.7 range
- Run 'grep -i amdtee /proc/modules' to check if the AMD TEE driver is loaded on the system
- Monitor '/var/log/kern.log' (Linux) or 'journalctl -k' for kernel oops/panic messages containing 'use-after-free' or 'UAF' related to amdtee_open_session or amdtee_close_session
- After patching, verify with 'uname -r' that the new kernel version is 6.5.8 or later, then reboot if necessary
FAQ
What is CVE-2023-52503?
CVE-2023-52503 is a use-after-free vulnerability in the AMD Trusted Execution Environment (TEE) driver within the Linux kernel, caused by an unprotected race condition between session reference counting and session destruction that allows attackers with local access to cause memory corruption.
Is CVE-2023-52503 being actively exploited?
No, CVE-2023-52503 is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2023-52503?
Linux kernel versions 6.2 through 6.5.7 are affected; the vulnerability is resolved in kernel 6.5.8 and later.
How do I check if my server is vulnerable to CVE-2023-52503?
Run 'uname -r' to display your kernel version; if the output shows a version between 6.2 and 6.5.7 inclusive, your system is vulnerable if AMD TEE is in use.
Does Defensia detect CVE-2023-52503?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2023-52503 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1680c82929bc14d706065f123dab77f2f1293116
- https://git.kernel.org/stable/c/1c95574350cd63bc3c5c2fa06658010768f2a0ce
- https://git.kernel.org/stable/c/60c3e7a00db954947c265b55099c21b216f2a05c
- https://git.kernel.org/stable/c/da7ce52a2f6c468946195b116615297d3d113a27
- https://git.kernel.org/stable/c/f4384b3e54ea813868bb81a861bf5b2406e15d8f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52503. Free for 1 server.
Get started free