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-58069 Overview
CVE-2024-58069 is an out-of-bounds write vulnerability in the Linux kernel's rtc-pcf85063 real-time clock driver. The flaw affects the NVMEM (non-volatile memory) read path for the PCF85063 RTC chip. The nvmem interface accepts variable buffer sizes, while the underlying regmap interface expects fixed-size storage aligned to an unsigned int. When an nvmem client supplies a buffer smaller than 4 bytes, regmap_read writes past the caller-supplied buffer, corrupting adjacent kernel memory [CWE-787].
Critical Impact
A local, low-privileged user interacting with the RTC NVMEM sysfs interface can trigger an out-of-bounds kernel write, leading to memory corruption, denial of service, or potential privilege escalation.
Affected Products
- Linux kernel branches containing the rtc-pcf85063 driver prior to the fix commits
- Debian LTS distributions tracked in the March and May 2025 advisories
- Embedded and IoT systems using the NXP PCF85063 RTC chip with Linux
Discovery Timeline
- 2025-03-06 - CVE-2024-58069 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-58069
Vulnerability Analysis
The vulnerability resides in the PCF85063 RTC driver's NVMEM read callback. The nvmem subsystem lets userspace and other kernel consumers request arbitrary byte-sized reads from device-backed storage. The PCF85063 driver forwarded the caller's buffer pointer directly to regmap_read, which treats its output argument as a pointer to an unsigned int and always writes 4 bytes.
When a client requested a read smaller than sizeof(unsigned int), for example a single byte via /sys/bus/nvmem/devices/<dev>/nvmem, regmap_read overwrote memory beyond the end of the destination buffer. The overflow lands in kernel heap or stack memory depending on the caller's allocation context.
The fix introduces an intermediary unsigned int on the stack. regmap_read writes into this safe variable, and the driver then copies only the requested number of bytes into the nvmem client's buffer.
Root Cause
The root cause is a type and size mismatch between two kernel APIs. nvmem operates on arbitrary byte counts, while regmap_read requires a fixed 4-byte unsigned int destination. The driver glue code failed to bridge this mismatch, assuming the client buffer was always wide enough.
Attack Vector
Exploitation requires local access and the ability to issue reads against the RTC NVMEM device node. On systems where the sysfs or character device nodes are accessible to non-root users or exposed to containerized workloads, a low-privileged process can craft a short read to trigger the overflow. The write is bounded to 1 to 3 extra bytes past the destination, which limits exploitation to adjacent slab or stack metadata corruption rather than large-scale overwrite primitives.
For technical details, see the upstream patches referenced in the kernel.org commits (for example c72b7a4 and e5e0645) and the Debian LTS Announcement March 2025.
Detection Methods for CVE-2024-58069
Indicators of Compromise
- Kernel log entries referencing pcf85063, nvmem, or regmap_read alongside slab corruption, KASAN reports, or stack canary panics
- Unexpected BUG: KASAN: slab-out-of-bounds or general protection fault messages originating from pcf85063_nvmem_read
- Non-root processes performing repeated short reads against /sys/bus/nvmem/devices/*/nvmem nodes tied to the RTC
Detection Strategies
- Enable KASAN (Kernel Address Sanitizer) in test and staging kernels to catch the out-of-bounds write deterministically
- Audit the running kernel version against the fix commits (21cd59f, 3ab8c5e, 517aedb, 6f2a8ca, 9adefa7, c72b7a4, e553667, e5e0645) across all supported stable branches
- Monitor for abnormal kernel oops or taint events on systems with PCF85063 hardware, including embedded and single-board computer fleets
Monitoring Recommendations
- Collect dmesg and /var/log/kern.log into a central log store and alert on panics referencing RTC or NVMEM code paths
- Track processes opening /dev/nvmem* and /sys/bus/nvmem/** paths; flag non-privileged accessors
- Inventory devices using the PCF85063 RTC via lsmod | grep pcf85063 and prioritize them for patching
How to Mitigate CVE-2024-58069
Immediate Actions Required
- Apply the stable kernel updates containing the fix to any system using the rtc-pcf85063 driver
- Restrict read permissions on RTC NVMEM sysfs and device nodes to root-only until patched
- On Debian LTS systems, install the kernel updates described in the March and May 2025 security announcements
Patch Information
The upstream fix is distributed across multiple stable branches as commits 21cd59fcb995, 3ab8c5ed4f84, 517aedb365f2, 6f2a8ca9a0a3, 9adefa7b9559, c72b7a474d3f, e5536677da80, and e5e06455760f. Each patch introduces an intermediary unsigned int to receive the regmap_read output and copies only the requested byte count into the nvmem client buffer. Distribution patches are available via the Debian LTS Announcement May 2025.
Workarounds
- Unload the driver with modprobe -r rtc-pcf85063 where the RTC is not required for system operation
- Tighten udev rules so that /sys/bus/nvmem/devices/*/nvmem and /dev/nvmem* nodes are owned by root with mode 0600
- Restrict container and sandbox access to /sys/bus/nvmem and the RTC device nodes via seccomp, AppArmor, or SELinux policy
# Example udev rule to restrict NVMEM device access to root
# /etc/udev/rules.d/90-nvmem-restrict.rules
SUBSYSTEM=="nvmem", OWNER="root", GROUP="root", MODE="0600"
# Verify the running kernel includes a fix commit
uname -r
zcat /proc/config.gz 2>/dev/null | grep CONFIG_RTC_DRV_PCF85063
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

