CVE-2026-18413
Last modified
CVE-2026-18413 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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.
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.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| zephyrproject | zephyr | >= 2.5.0, < 4.4.2 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-18413?
How severe is CVE-2026-18413?
How do I fix CVE-2026-18413?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-18406The SureForms – Contact Form Builder, AI Forms, Payment Form…7.2
- CVE-2026-18408Untrusted data inclusion in pg_dump in PostgreSQL allows a m…8.8
- CVE-2026-18409The WPForms Pro plugin for WordPress is vulnerable to Stored…7.2
- CVE-2026-1841The PixelYourSite – Your smart PIXEL (TAG) & API Manager plu…7.2
- CVE-2026-18411The KARR Security System and SWDS dealer-installed automotiv…8.1
- CVE-2026-18412OpenCart extensions are uploaded as zip files with .ocmod.zi…9.1
- CVE-2026-18414The ADC API requires each driver to reject a sampling sequen…7.8
- CVE-2026-18415ieee802154_send() in subsys/net/l2/ieee802154/ieee802154.c c…6.3
- CVE-2026-18416The CoAP link-format helper match_path_uri() in subsys/net/l…3.7
- CVE-2026-1842HyperCloud versions 2.3.5 through 2.6.8 improperly allowed r…6.2
- CVE-2026-18420Improper input validation in the Time Series Visual Builder …8.8
- CVE-2026-18421Concrete CMS 9 through 9.5.2 does not perform an authorizati…2.1
Are you affected by CVE-2026-18413?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
