Skip to content
Heist/ feed
High

Out-of-bounds write in the ADI MAX32 ADC driver due to incorrect adc_sequence buffer size validation

Type: advisorySource: Official CVE List1 source record

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 ADI MAX32 driver did not honour that contract. start_read() in drivers/adc/adc_max32.c compared buffer_size, a byte count, against a sample count ((1 + extra_samplings) channels), ignoring sizeof(uint16_t), so it accepted a buffer half the required size. The samples are then stored through the uint16_t data->buffer by Wrap_MXC_ADC_GetData(), which writes two bytes per sample and advances the pointer by one uint16_t: in adc_max32_start_channel() for synchronous reads, and in adc_max32_isr() for asynchronous ones. A sequence selecting two channels with a two-byte buffer, for example, passes the check and 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 a MAX32 ADC device object therefore fully controls channels, buffer, buffer_siz

Announced Source revision 1
Original source ↗

CVE-2026-18414

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-18414

zephyr

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "zephyrproject",
    "product": "zephyr",
    "versions": [
      {
        "status": "affected",
        "version": "4.0.0",
        "lessThan": "4.4.2",
        "versionType": "semver"
      }
    ],
    "packageName": "zephyr",
    "programFiles": [
      "drivers/adc/adc_common.c",
      "drivers/adc/adc_common.h",
      "drivers/adc/adc_max32.c",
      "drivers/adc/adc_mcux_lpadc.c"
    ],
    "collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
    "defaultStatus": "unaffected",
    "programRoutines": [
      {
        "name": "adc_max32_isr"
      },
      {
        "name": "adc_max32_start_channel"
      },
      {
        "name": "start_read"
      }
    ]
  }
]
Related CVEs
CVE-2026-18414

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#4499 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement