Description
The ADC API requires each driver to reject a sampling sequence whose destination buffer is too small: the buffer_size field of struct adc_sequence in include/zephyr/drivers/adc.h documents that "the driver must ensure that samples are not written beyond the limit and it must return an error if the buffer turns out to be not large enough". The NXP MCUX LPADC driver did not honour that contract. mcux_lpadc_start_read() in drivers/adc/adc_mcux_lpadc.c performed no buffer-size check at all before assigning data->buffer = sequence->buffer. Each completed conversion then stores one 16-bit sample per enabled channel per sampling round through an unbounded *data->buffer++: in mcux_lpadc_isr() for interrupt-driven builds, and in mcux_lpadc_dma_callback() for DMA-driven builds on releases that have the DMA path. A sequence selecting two channels with a two-byte buffer, for example, has its second sample written past the end of the buffer.

On a build with CONFIG_USERSPACE, adc_read() and adc_read_async() are system calls. The handler in drivers/adc/adc_handlers.c copies the sequence in from user memory, verifies only that [buffer, buffer + buffer_size) is writable by the calling thread, and rejects a user-supplied options->callback; it deliberately leaves the size arithmetic to the driver. A user-mode thread that has been granted access to an LPADC device object therefore fully controls channels, buffer, buffer_size and options->extra_samplings, and can request far more samples than its buffer can hold: up to channels * 65536 samples into a two-byte buffer, since the sample pointer is only rewound on a repeat sampling, never on the extra samplings of a sequence.

The resulting stores are performed by the driver in kernel mode (in the ADC interrupt handler or the DMA completion callback), where the MPU does not restrict the thread's memory domain, so the write walks linearly out of the user partition and into adjacent memory such as other partitions, kernel data or thread stacks. The impact is kernel-memory corruption of attacker-chosen length at an attacker-chosen offset, a plausible privilege-escalation and denial-of-service primitive from an unprivileged user-mode thread. Builds without CONFIG_USERSPACE are affected only as a caller-side robustness defect, since the application itself supplies the buffer.

The fix calls the new shared helper adc_sequence_validate_buffer() in drivers/adc/adc_common.c from mcux_lpadc_start_read(). The helper computes active_channels sizeof(uint16_t) (1 + extra_samplings) and returns -ENOMEM before any sampling is started.
Published: 2026-09-28
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Kernel memory corruption potentially leading to privilege escalation or denial of service
Action: Patch ASAP
AI Analysis

Impact

An out‑of‑bounds write flaw in the NXP MCUX LPADC ADC driver causes the driver to write beyond the user‑supplied buffer without performing a buffer size check. The driver assigns the buffer supplied by a user‑mode thread and then writes 16‑bit samples into it one channel at a time during each sampling round, even for extra samplings that are not accounted for in the original buffer size. Because the driver operates in kernel mode, the writes occur without the protection of the MPU, corrupting adjacent kernel memory or thread stacks. This memory corruption can provide an unprivileged user‑mode thread with a practical privilege‑escalation or denial‑of‑service vector.

Affected Systems

The vulnerability exists in the Zephyr operating system when the NXP MCUX LPADC driver is compiled with the CONFIG_USERSPACE configuration enabled. Any Zephyr build that includes this driver and exposes it to user space is affected. No specific release version is listed, so the flaw may exist in current and future releases that do not incorporate the adc_sequence_validate_buffer() fix.

Risk and Exploitability

The CVSS base score of 7.8 indicates high severity. The EPSS score is not available, so the exact exploitation likelihood cannot be quantified but the flaw is not trivial to mitigate: a user‑mode thread with device access can provide an oversized buffer or request many extra samplings, causing writes beyond the buffer bounds in kernel‑mode interrupt or DMA callbacks. The resulting kernel‑memory corruption can be leveraged to alter critical kernel data or thread stacks, enabling privilege escalation or denial of service. In builds without CONFIG_USERSPACE the risk is limited to a robustness defect, but the underlying driver flaw remains present and should still be corrected.

Generated by OpenCVE AI on September 28, 2026 at 22:07 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Zephyr kernel to a release that incorporates the adc_sequence_validate_buffer() fix or back‑port the patch from the referenced commit.
  • If an upgrade is not feasible, deny unprivileged user‑mode threads access to the LPADC device by adjusting device permissions or disabling device access from untrusted threads.
  • For builds that cannot change permissions, disable CONFIG_USERSPACE for the MCUX LPADC driver to prevent kernel memory corruption from user‑space interactions.

Generated by OpenCVE AI on September 28, 2026 at 22:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 30 Sep 2026 21:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 28 Sep 2026 22:15:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Mon, 28 Sep 2026 20:30:00 +0000

Type Values Removed Values Added
Description The ADC API requires each driver to reject a sampling sequence whose destination buffer is too small: the buffer_size field of struct adc_sequence in include/zephyr/drivers/adc.h documents that "the driver must ensure that samples are not written beyond the limit and it must return an error if the buffer turns out to be not large enough". The NXP MCUX LPADC driver did not honour that contract. mcux_lpadc_start_read() in drivers/adc/adc_mcux_lpadc.c performed no buffer-size check at all before assigning data->buffer = sequence->buffer. Each completed conversion then stores one 16-bit sample per enabled channel per sampling round through an unbounded *data->buffer++: in mcux_lpadc_isr() for interrupt-driven builds, and in mcux_lpadc_dma_callback() for DMA-driven builds on releases that have the DMA path. A sequence selecting two channels with a two-byte buffer, for example, has its second sample written past the end of the buffer. On a build with CONFIG_USERSPACE, adc_read() and adc_read_async() are system calls. The handler in drivers/adc/adc_handlers.c copies the sequence in from user memory, verifies only that [buffer, buffer + buffer_size) is writable by the calling thread, and rejects a user-supplied options->callback; it deliberately leaves the size arithmetic to the driver. A user-mode thread that has been granted access to an LPADC device object therefore fully controls channels, buffer, buffer_size and options->extra_samplings, and can request far more samples than its buffer can hold: up to channels * 65536 samples into a two-byte buffer, since the sample pointer is only rewound on a repeat sampling, never on the extra samplings of a sequence. The resulting stores are performed by the driver in kernel mode (in the ADC interrupt handler or the DMA completion callback), where the MPU does not restrict the thread's memory domain, so the write walks linearly out of the user partition and into adjacent memory such as other partitions, kernel data or thread stacks. The impact is kernel-memory corruption of attacker-chosen length at an attacker-chosen offset, a plausible privilege-escalation and denial-of-service primitive from an unprivileged user-mode thread. Builds without CONFIG_USERSPACE are affected only as a caller-side robustness defect, since the application itself supplies the buffer. The fix calls the new shared helper adc_sequence_validate_buffer() in drivers/adc/adc_common.c from mcux_lpadc_start_read(). The helper computes active_channels sizeof(uint16_t) (1 + extra_samplings) and returns -ENOMEM before any sampling is started.
Title Out-of-bounds write in the NXP MCUX LPADC ADC driver due to missing adc_sequence buffer size validation
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-09-30T20:11:11.842Z

Reserved: 2026-07-30T17:54:09.140Z

Link: CVE-2026-18413

cve-icon Vulnrichment

Updated: 2026-09-30T19:45:34.582Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-28T21:17:17.090

Modified: 2026-09-30T21:17:09.877

Link: CVE-2026-18413

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-28T22:15:09Z

Weaknesses