Bug 2363689 (CVE-2023-53047)

Summary: CVE-2023-53047 kernel: tee: amdtee: fix race condition in amdtee_open_session
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A use-after-free vulnerability was found in the AMD TEE driver in the Linux kernel. The flaw occurs from a race condition in the `amdtee_open_session()` function, where the session is marked as active in `sess->sess_mask` before the corresponding `sess` structure is fully initialized. If a parallel thread invokes `amdtee_close_session()` during this window of time, it can lead to the structure being freed prematurely. This can lead to system instability, a denial of service, or remote code execution.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-05-02 16:01:49 UTC
In the Linux kernel, the following vulnerability has been resolved:

tee: amdtee: fix race condition in amdtee_open_session

There is a potential race condition in amdtee_open_session that may
lead to use-after-free. For instance, in amdtee_open_session() after
sess->sess_mask is set, and before setting:

    sess->session_info[i] = session_info;

if amdtee_close_session() closes this same session, then 'sess' data
structure will be released, causing kernel panic when 'sess' is
accessed within amdtee_open_session().

The solution is to set the bit sess->sess_mask as the last step in
amdtee_open_session().

Comment 1 Avinash Hanwate 2025-05-05 04:35:21 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050204-CVE-2023-53047-7e31@gregkh/T

Comment 5 errata-xmlrpc 2025-08-18 11:54:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2025:14003 https://access.redhat.com/errata/RHSA-2025:14003

Comment 6 errata-xmlrpc 2025-08-18 12:12:08 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2025:14005 https://access.redhat.com/errata/RHSA-2025:14005

Comment 7 errata-xmlrpc 2025-08-27 11:39:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2025:14744 https://access.redhat.com/errata/RHSA-2025:14744

Comment 8 errata-xmlrpc 2025-08-27 13:19:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2025:14749 https://access.redhat.com/errata/RHSA-2025:14749