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-57904 Overview
CVE-2024-57904 affects the Linux kernel's Industrial I/O (IIO) subsystem, specifically the AT91 ADC touchscreen driver. The vulnerability stems from an incorrect pointer being passed to input_free_device() in the at91_ts_register() function. The error path can be reached before the allocated iio_dev is stored in st->ts_input, resulting in the free routine operating on an uninitialized pointer. Local attackers with low privileges can leverage this flaw to impact confidentiality, integrity, and availability on affected systems. The issue affects multiple Linux kernel branches, including the 6.13 release candidates.
Critical Impact
Local exploitation can lead to kernel memory corruption, potentially enabling privilege escalation or denial of service on systems running vulnerable Linux kernel versions.
Affected Products
- Linux Kernel (multiple stable branches)
- Linux Kernel 6.13-rc1 through 6.13-rc6
- Debian LTS distributions shipping affected kernels
Discovery Timeline
- 2025-01-19 - CVE-2024-57904 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-57904
Vulnerability Analysis
The flaw resides in the at91_ts_register() function within the Atmel AT91 ADC driver (drivers/iio/adc/at91_adc.c). The function allocates an iio_dev input device and later assigns the result to the st->ts_input structure member. If an error occurs before this assignment completes, control transfers to the err label, which calls input_free_device(st->ts_input). At that point, st->ts_input has not yet been populated, so the kernel operates on a stale or uninitialized pointer instead of releasing the newly allocated device.
The fix changes the error path to call input_free_device(input) on the local variable that holds the actual allocation. This ensures the correct object is released and prevents memory handling errors in the touchscreen registration path.
Root Cause
The root cause is a logic error in resource cleanup. The code releases the wrong object on the error path, creating a double-free or memory leak condition depending on execution flow. The affected driver registers touchscreen functionality on AT91-series microcontrollers running Linux, meaning the vulnerable code path executes during device probe.
Attack Vector
Exploitation requires local access with low privileges. An attacker capable of triggering the error path in at91_ts_register(), for example by manipulating device-tree properties or forcing allocation failures through resource pressure, can corrupt kernel memory state. Successful exploitation may enable privilege escalation to root or produce a kernel panic resulting in denial of service.
No public proof-of-concept has been published, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.
Detection Methods for CVE-2024-57904
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing at91_adc or input_free_device in dmesg output.
- Kernel warnings about use-after-free or invalid pointer dereferences during touchscreen device probe.
- Unexplained reboots on AT91-based embedded Linux devices with IIO ADC touchscreen support enabled.
Detection Strategies
- Inventory running kernel versions across Linux hosts using uname -r and compare against patched release trees listed in the kernel.org stable commits.
- Audit systems with CONFIG_AT91_ADC=y or the corresponding module loaded via lsmod | grep at91_adc.
- Review distribution security trackers, including the Debian LTS announcement, for applicable fixed package versions.
Monitoring Recommendations
- Centralize kernel log collection to detect crash signatures associated with the AT91 ADC driver.
- Monitor package management events for kernel updates to confirm patch deployment across the fleet.
- Track IIO subsystem probe failures as part of host telemetry baselines.
How to Mitigate CVE-2024-57904
Immediate Actions Required
- Apply vendor-supplied kernel updates referenced in the Linux stable tree commits as soon as they are available for your distribution.
- Prioritize patching embedded and industrial Linux systems that enable the AT91 ADC touchscreen driver.
- Restrict local shell access on vulnerable hosts to trusted administrators until patches are deployed.
Patch Information
The upstream fix replaces input_free_device(st->ts_input) with input_free_device(input) on the error path of at91_ts_register(). The change has been backported across multiple stable branches. Relevant upstream commits include d115b7f, 028a1ba, 09e067e, 25ef52f, ac8d932, b549c90, and de6a73b. Debian users should consult the Debian LTS announcement for fixed package versions.
Workarounds
- Disable the AT91 ADC touchscreen driver if it is not required by setting CONFIG_AT91_ADC=n and rebuilding the kernel.
- Unload the module at runtime where feasible using modprobe -r at91_adc on systems without active touchscreen requirements.
- Enforce strict local-access controls to reduce the pool of users who can trigger driver probe paths.
# Verify kernel version and check for AT91 ADC driver presence
uname -r
lsmod | grep at91_adc
# Remove the driver at runtime if the touchscreen is unused
sudo modprobe -r at91_adc
# Apply distribution kernel updates (Debian example)
sudo apt update && sudo apt upgrade linux-image-$(uname -r | cut -d- -f3-)
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

