CVE-2026-19184: bounds in zephyrproject zephyr
Description
The NXP GAU ADC driver (drivers/adc/adc_mcux_gau_adc.c) validated the caller-supplied sequence->buffer_size, which is expressed in bytes, against the number of active channels, which is a sample count. It then stored that byte count directly in data->results_length and used it in mcux_gau_adc_read_samples() as the number of uint16_t slots available. Because each conversion result occupies sizeof(uint16_t) bytes, a buffer that was accepted as "large enough" could be written with up to twice its size in bytes, so every sample past the buffer's midpoint was written out of bounds. adc_read() and adc_read_async() are Zephyr system calls. The syscall verifier in drivers/adc/adc_handlers.c only confirms that the caller owns buffer_size writable bytes (K_SYSCALL_MEMORY_WRITE); deciding whether that size is sufficient for the requested channels and extra_samplings is delegated entirely to the driver. On a build with CONFIG_USERSPACE=y, a user-mode thread that has been granted the ADC device object could therefore submit a deliberately half-sized buffer and cause the driver's work-queue handler — which runs in supervisor mode, outside the caller's MPU restrictions — to write ADC conversion results past the end of that buffer, at an address and for a length of the caller's choosing. The overrun is bounded by the requested sequence: with sequence->options->extra_samplings set, the sampling loop walks the buffer pointer forward across every sampling, so the total overrun can reach the full size of the supplied buffer (kilobytes for a large extra_samplings). The written words are 16-bit ADC conversion results, so the content is only partially attacker-influenced (via the selected analog input, gain and resolution), but the destination and length are fully controlled — sufficient for kernel memory corruption, a crash, or a userspace-to-kernel privilege escalation. Builds without CONFIG_USERSPACE, or on SoCs other than NXP RW61x with the GAU ADC node enabled, are not exposed to the privilege boundary; there the same defect only causes a silent overflow when the application itself passes an undersized buffer. The fix replaces the ad-hoc check with the shared adc_sequence_validate_buffer() helper (validating against num_channels * sizeof(uint16_t)), stores buffer_size / sizeof(uint16_t) in results_length, and corrects the loop bound to a post-decrement so exactly the available number of slots may be written.
CVSS v3.1
Score 8.4high
Affected software
zephyrproject
zephyr
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The NXP GAU ADC driver in Zephyr incorrectly compares the caller-supplied buffer size (in bytes) against the number of active ADC channels (sample count), storing the byte count directly as the number of uint16_t slots available. Because each ADC sample occupies 2 bytes, this leads to a buffer overrun of up to twice the buffer size. In user-mode builds with CONFIG_USERSPACE enabled, a user thread with ADC device access can submit an undersized buffer, causing the kernel-mode driver to write beyond the buffer boundary. This can corrupt kernel memory or cause privilege escalation. The flaw does not affect builds without CONFIG_USERSPACE or other SoCs without the GAU ADC node. The fix replaces the ad-hoc check with a proper validation helper, adjusts the stored result length, and corrects the sampling loop to prevent overruns.
Potential Impact
This vulnerability allows a local user-mode thread with ADC device access to cause out-of-bounds writes in kernel memory, potentially leading to kernel memory corruption, system crashes, or privilege escalation from user to kernel mode. The impact is limited to Zephyr builds with CONFIG_USERSPACE enabled on NXP RW61x SoCs with the GAU ADC node. Other builds or SoCs may experience silent buffer overflows without privilege escalation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The described fix involves using the shared adc_sequence_validate_buffer() helper to properly validate buffer sizes, storing the buffer size in units of uint16_t samples, and correcting the sampling loop bounds. Users should monitor Zephyr project advisories for the official fix and apply it once available. Until patched, restrict user-mode access to the ADC device on affected platforms to trusted code only.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-08-06T18:36:10.589Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ac360f72cdf04f656dd42c1
Added to database: 10/05/2026, 08:33:59 UTC
Last enriched: 10/05/2026, 08:48:18 UTC
Last updated: 10/05/2026, 18:56:34 UTC
Views: 18
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.