Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-31082 Overview
CVE-2024-31082 is a heap-based buffer over-read vulnerability in the X.Org server's ProcAppleDRICreatePixmap() function. The flaw occurs when byte-swapped length values are used in protocol replies, allowing a client with different endianness than the server to trigger out-of-bounds heap reads. An authenticated local client can abuse this condition to leak heap memory contents or crash the X server with a segmentation fault when the read reaches an unmapped page. While the attacker cannot select the specific memory copied into replies, the 32-bit length field permits large attempted reads from heap-adjacent memory. The vulnerability is classified under [CWE-126] (Buffer Over-read).
Critical Impact
Local attackers with X server access can leak heap memory via byte-swapped protocol replies or crash the display server, disrupting graphical sessions.
Affected Products
- X.Org Server (xserver) with Apple-DRI extension enabled
- XWayland builds incorporating the vulnerable Apple-DRI code path
- Linux distributions shipping affected X.Org server packages (including Red Hat Enterprise Linux)
Discovery Timeline
- 2024-04-04 - CVE CVE-2024-31082 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-31082
Vulnerability Analysis
The vulnerability resides in the ProcAppleDRICreatePixmap() request handler within the X.Org server's Apple-DRI extension. When a client connects using a byte order different from the server, the server performs byte-swapping on request and reply fields. The handler uses a length value from the client request to size the data copied into the reply buffer without validating that the swapped length corresponds to the actual allocated buffer size.
As a result, the server reads adjacent heap memory beyond the intended object boundary and transmits that data back to the requesting client. Because the length is a 32-bit integer, the over-read can span a large memory region, continuing until an unmapped page is encountered. At that point, the X server process receives a segmentation fault and terminates, ending all graphical sessions bound to that server instance.
Root Cause
The root cause is missing bounds validation after byte-swap conversion of client-supplied length values in the Apple-DRI reply path. The handler trusts the swapped length when copying heap memory into the reply, violating the invariant that reply payload size must match the allocated structure size. This is a classic [CWE-126] buffer over-read introduced by endianness-handling logic.
Attack Vector
Exploitation requires a local, authenticated client capable of connecting to the X server with opposite endianness relative to the server process. The attacker crafts an Apple-DRI protocol request that triggers ProcAppleDRICreatePixmap() with a manipulated length field. The server returns heap bytes to the client and may be driven to crash on an unmapped page fault. No user interaction is required beyond the attacker's own session.
No verified public proof-of-concept code is available. See the Red Hat CVE-2024-31082 Advisory and the X.Org Announcement April 2024 for upstream technical details.
Detection Methods for CVE-2024-31082
Indicators of Compromise
- Unexpected X.Org server crashes or restarts with segmentation fault signatures in /var/log/Xorg.*.log or systemd journal entries.
- Core dumps from the Xorg or Xwayland process referencing frames inside ProcAppleDRICreatePixmap or Apple-DRI dispatch routines.
- X protocol connections from local clients using non-native byte order against a server where endianness mismatch is not operationally expected.
Detection Strategies
- Audit running X.Org server versions against vendor advisories to identify unpatched hosts exposing the Apple-DRI extension.
- Monitor process termination events for Xorg and Xwayland with abnormal exit codes correlated to local user activity.
- Review xserver build configuration to determine whether the Apple-DRI extension is compiled in on non-Apple deployments.
Monitoring Recommendations
- Forward X server logs and application crash telemetry to a centralized logging platform for correlation across hosts.
- Alert on repeated crashes of the display server tied to a single local user account within a short time window.
- Track installation and update events for xorg-x11-server and related packages to confirm patch coverage.
How to Mitigate CVE-2024-31082
Immediate Actions Required
- Apply the X.Org server updates referenced in the X.Org Announcement April 2024 and your distribution's security advisories.
- On Red Hat systems, follow guidance in the Red Hat CVE-2024-31082 Advisory and update xorg-x11-server packages.
- Restrict local shell access on multi-user systems running X.Org to trusted users only until patches are deployed.
Patch Information
Upstream X.Org released fixes in the April 2024 security roll-up that add proper bounds validation to the Apple-DRI reply handling path. Downstream vendors including Red Hat have shipped patched xorg-x11-server builds; consult the Red Hat Bug Report #2271999 and the Openwall OSS-Security Discussion - April 3 thread for the complete patch set and affected version ranges.
Workarounds
- Disable the Apple-DRI extension in the X.Org server configuration where it is not required for the workload.
- Enforce single-byte-order client environments to reduce the attack surface, acknowledging this does not eliminate the underlying flaw.
- Where feasible, migrate workloads from X.Org to a Wayland compositor that does not load the Apple-DRI extension.
# Configuration example: disable AppleDRI module in xorg.conf
Section "Module"
Disable "dri"
Disable "appledri"
EndSection
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

