CVE-2023-52568

x86/sgx: Resolves SECS reclaim vs. page fault for EAUG race

MEDIUM
4.7
CVSS Score
Published: March 2, 2024 at 09:59 PM UTC
Updated: June 17, 2026 at 06:43 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.7
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: x86/sgx: Resolves SECS reclaim vs. page fault for EAUG race The SGX EPC reclaimer (ksgxd) may reclaim the SECS EPC page for an enclave and set secs.epc_page to NULL. The SECS page is used for EAUG and ELDU in the SGX page fault handler. However, the NULL check for secs.epc_page is only done for ELDU, not EAUG before being used. Fix this by doing the same NULL check and reloading of the SECS page as needed for both EAUG and ELDU. The SECS page holds global enclave metadata. It can only be reclaimed when there are no other enclave pages remaining. At that point, virtually nothing can be done with the enclave until the SECS page is paged back in. An enclave can not run nor generate page faults without a resident SECS page. But it is still possible for a #PF for a non-SECS page to race with paging out the SECS page: when the last resident non-SECS page A triggers a #PF in a non-resident page B, and then page A and the SECS both are paged out before the #PF on B is handled. Hitting this bug requires that race triggered with a #PF for EAUG. Following is a trace when it happens. BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:sgx_encl_eaug_page+0xc7/0x210 Call Trace: ? __kmem_cache_alloc_node+0x16a/0x440 ? xa_load+0x6e/0xa0 sgx_vma_fault+0x119/0x230 __do_fault+0x36/0x140 do_fault+0x12f/0x400 __handle_mm_fault+0x728/0x1110 handle_mm_fault+0x105/0x310 do_user_addr_fault+0x1ee/0x750 ? __this_cpu_preempt_check+0x13/0x20 exc_page_fault+0x76/0x180 asm_exc_page_fault+0x27/0x30

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.0 ≤ v < 6.1.566.0 ≤ v < 6.5.66.0 ≤ v < 6.66.2 ≤ v < 6.5.65a90d2c3f5ef87717e54572af8426aba6fdbdaa66.6 rc16.6 rc26.6 rc3
Vendor states this is fixed in 1348f7f15d7c7798456856bee74a4235c2da994e (fixed)
Vendor states this is fixed in 811ba2ef0cb6402672e64ba1419d6ef95aa3405d (fixed)
Vendor states this is fixed in c6c2adcba50c2622ed25ba5d5e7f05f584711358 (fixed)
Vendor states this is fixed in 6.0 (unaffected)
Vendor states this is fixed in 6.1.56 (unaffected)
Vendor states this is fixed in 6.5.6 (unaffected)
Vendor states this is fixed in 6.6 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1348f7f15d7c7798456856bee74a4235c2da994e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/811ba2ef0cb6402672e64ba1419d6ef95aa3405d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c6c2adcba50c2622ed25ba5d5e7f05f584711358

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card