Vulnerability · Published Mar 2, 2024 · Assigned by Linux

CVE-2023-52503tee: amdtee: fix use-after-free vulnerability in amdtee_close_session

High 7.8

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 82.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.64-1DEBIAN-CVE-2023-52503
Debian:13linux6.5.8-1DEBIAN-CVE-2023-52503
Debian:14linux6.5.8-1DEBIAN-CVE-2023-52503
Ubuntu:22.04:LTSlinux5.15.0-94.104UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-aws5.15.0-1053.58UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure5.15.0-1056.64UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1056.64.1UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-gcp5.15.0-1051.59UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-gke5.15.0-1050.55UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1036.42UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-ibm5.15.0-1046.49UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1047.53UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-kvm5.15.0-1050.55UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-94.104UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1044.44UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1014.14UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1022.22UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1009.9UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-oracle5.15.0-1051.57UBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-raspi5.15.0-1046.49UBUNTU-CVE-2023-52503
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52503
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1027.31UBUNTU-CVE-2023-52503

Affected products (as reported)

VendorProductVersions
Linux Linux 757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before da7ce52a2f6c468946195b116615297d3d113a27757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before 1680c82929bc14d706065f123dab77f2f1293116757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before 60c3e7a00db954947c265b55099c21b216f2a05c757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before 1c95574350cd63bc3c5c2fa06658010768f2a0ce757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before f4384b3e54ea813868bb81a861bf5b2406e15d8f
Linux Linux 5.6

References