CVE-2023-52503

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
02/03/2024
Last modified:
10/12/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> tee: amdtee: fix use-after-free vulnerability in amdtee_close_session<br /> <br /> There is a potential race condition in amdtee_close_session that may<br /> cause use-after-free in amdtee_open_session. For instance, if a session<br /> has refcount == 1, and one thread tries to free this session via:<br /> <br /> kref_put(&amp;sess-&gt;refcount, destroy_session);<br /> <br /> the reference count will get decremented, and the next step would be to<br /> call destroy_session(). However, if in another thread,<br /> amdtee_open_session() is called before destroy_session() has completed<br /> execution, alloc_session() may return &amp;#39;sess&amp;#39; that will be freed up<br /> later in destroy_session() leading to use-after-free in<br /> amdtee_open_session.<br /> <br /> To fix this issue, treat decrement of sess-&gt;refcount and removal of<br /> &amp;#39;sess&amp;#39; from session list in destroy_session() as a critical section, so<br /> that it is executed atomically.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.6 (including) 5.10.199 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.136 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.59 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.5.8 (excluding)
cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc5:*:*:*:*:*:*