CVE-2026-98677: iio: adc: ad_sigma_delta: fix use-after-free on unbind

Published Oct 18, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

iio: adc: adsigmadelta: fix use-after-free on unbind

adsdbufferpostenable() allocates sigmadelta->samplesbuf with devmkrealloc() at runtime, so its devres entry sits after all probe-time entries of the driver. devm resources are released in reverse allocation order, which means unbind frees samplesbuf before iiodeviceunregister() disables the buffers and detaches the trigger pollfunc. The data ready IRQ is still enabled at that point, so adsdtriggerhandler() can still run and memcpy() incoming samples into the freed samplesbuf.

Fix this by preallocating the buffer in devmadsdsetupbufferandtrigger(), before the triggered buffer and the IRQ are set up, so it is freed only after iiodeviceunregister() has drained the trigger handler via freeirq(). Size it for the worst case of all sequencer slots being active; adsdvalidatescanmask() already caps the number of active channels at numslots.

This issue was found by an in-house static analysis tool.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Preallocate sigma_delta->samples_buf during probe/setup for the worst case of all sequencer slots being active, instead of using devm_krealloc() at runtime, so the buffer remains valid until after iio_device_unregister() has disabled buffers and detached the trigger.

Event History

Oct 18, 2026
CVE Published
via MITRE·03:45 PM
Data Sourced
via MITRE·03:45 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203