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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.64-1 | DEBIAN-CVE-2023-52503 |
| Debian:13 | linux | 6.5.8-1 | DEBIAN-CVE-2023-52503 |
| Debian:14 | linux | 6.5.8-1 | DEBIAN-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux | 5.15.0-94.104 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1053.58 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1056.64 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1056.64.1 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1051.59 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1050.55 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1036.42 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1046.49 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1047.53 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1050.55 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-94.104 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1044.44 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1014.14 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1022.22 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1009.9 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1051.57 | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1046.49 | UBUNTU-CVE-2023-52503 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52503 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1027.31 | UBUNTU-CVE-2023-52503 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before da7ce52a2f6c468946195b116615297d3d113a27757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before 1680c82929bc14d706065f123dab77f2f1293116757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before 60c3e7a00db954947c265b55099c21b216f2a05c757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before 1c95574350cd63bc3c5c2fa06658010768f2a0ce757cc3e9ff1d72d014096399d6e2bf03974d9da1 – before f4384b3e54ea813868bb81a861bf5b2406e15d8f |
| Linux | Linux | 5.6 |
References
- https://git.kernel.org/stable/c/da7ce52a2f6c468946195b116615297d3d113a27
- https://git.kernel.org/stable/c/1680c82929bc14d706065f123dab77f2f1293116
- https://git.kernel.org/stable/c/60c3e7a00db954947c265b55099c21b216f2a05c
- https://git.kernel.org/stable/c/1c95574350cd63bc3c5c2fa06658010768f2a0ce
- https://git.kernel.org/stable/c/f4384b3e54ea813868bb81a861bf5b2406e15d8f