CVE-2024-57874·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: arm64: ptrace: fix partial SETREGSET for NT_ARM_TAGGED_ADDR_CTRL Currently tagged_addr_ctrl_set() doesn't initialize the temporary 'ctrl' variable, and a SETREGSET call with a length of zero will leave this uninitialized. Consequently tagged_addr_ctrl_set() will consume an arbitrary value, potentially leaking up to 64 bits of memory from the kernel stack. The read is limited to a specific slot on the stack, and the issue does not provide a write mechanism. As set_tagged_addr_ctrl() only accepts values where bits [63:4] zero and rejects other values, a partial SETREGSET attempt will randomly succeed or fail depending on the value of the uninitialized value, and the exposure is significantly limited. Fix this by initializing the temporary value before copying the regset from userspace, as for other regsets (e.g. NT_PRSTATUS, NT_PRFPREG, NT_ARM_SYSTEM_CALL). In the case of a zero-length write, the existing value of the tagged address ctrl will be retained. The NT_ARM_TAGGED_ADDR_CTRL regset is only visible in the user_aarch64_view used by a native AArch64 task to manipulate another native AArch64 task. As get_tagged_addr_ctrl() only returns an error value when called for a compat task, tagged_addr_ctrl_get() and tagged_addr_ctrl_set() should never observe an error value from get_tagged_addr_ctrl(). Add a WARN_ON_ONCE() to both to indicate that such an error would be unexpected, and error handlnig is not missing in either case.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.12.5
- Published
- 2025-01-11
Affected versions
From: 6.7
Until: 6.12.5
Fixed in: 6.12.5
How to fix this CVE
Update your Linux kernel to version 6.12.5 or later to address a memory disclosure vulnerability in ARM64 ptrace operations. This fix initializes a temporary control variable before copying regset data from userspace, preventing potential kernel stack memory leaks during partial SETREGSET calls on the NT_ARM_TAGGED_ADDR_CTRL register set.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r (should be 6.12.5 or later for ARM64 systems)
- Verify kernel vulnerability status: grep -i 'tagged_addr_ctrl' /proc/config.gz (if CONFIG_ARM64=y, system may be affected if kernel < 6.12.5)
- Monitor ptrace-related syscalls: ausearch -k ptrace -ts recent (look for SETREGSET operations on NT_ARM_TAGGED_ADDR_CTRL)
- Confirm patch application: cat /proc/version and verify kernel release date is after the fix date for version 6.12.5
FAQ
What is CVE-2024-57874?
This vulnerability is an information disclosure flaw in ARM64 ptrace handling where an uninitialized kernel stack variable could leak up to 64 bits of memory when a zero-length SETREGSET call targets the NT_ARM_TAGGED_ADDR_CTRL register set. The exposure is limited by strict validation that only accepts values with bits [63:4] as zero.
Is CVE-2024-57874 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2024-57874?
Linux kernel versions 6.7 through 6.12.4 on ARM64 systems are affected. The vulnerability was patched in kernel 6.12.5.
How do I check if my server is vulnerable to CVE-2024-57874?
Run 'uname -r' to check your kernel version—if it returns a version between 6.7 and 6.12.4 on an ARM64 system, you are vulnerable. Verify architecture with 'uname -m' (should show 'aarch64').
Does Defensia detect CVE-2024-57874?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored ARM64 server, CVE-2024-57874 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1152dd13845efde5554f80c7e1233bae1d26bd3e
- https://git.kernel.org/stable/c/1370cf3eb5495d70e00547598583a4cd45b40b99
- https://git.kernel.org/stable/c/1c176f5155ee6161fee6f416b64aa50394d3f220
- https://git.kernel.org/stable/c/96035c0093db258975b8887676afe59a64c34a72
- https://git.kernel.org/stable/c/abd614bbfcee73247495bd9472da8f85ac83546e
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-57874. Free for 1 server.
Get started free