CVE-2026-139285: gpiolib: fix memory leak in gpiod_set_array_value_complex() EPERM error path

Published Nov 30, 2026
·
Updated

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

gpiolib: fix memory leak in gpiodsetarrayvaluecomplex() EPERM error path

A drive-by review by Sashiko reports that, where the line has not been configured as an output, gpiodsetarrayvaluecomplex() can return without freeing potentially alloced bitmaps, thus leaking memory.

Cleanup the bitmaps before returning.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In gpiod_set_array_value_complex(), free any allocated bitmaps before returning on the EPERM error path.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description

Frequently Asked Questions

1

What condition triggers the memory leak?

The leak occurs when gpiod_set_array_value_complex() is called for a GPIO line that has not been configured as an output and takes the EPERM error path. Potentially allocated bitmaps are not freed before the function returns.

2

What is the practical impact of repeated triggering?

Repeated calls that reach this error path can leak kernel memory through the unfreed bitmaps. The provided information does not quantify the amount of memory leaked per call or identify a specific exploitation outcome.

3

What should be done if the fix cannot be applied immediately?

Avoid invoking gpiod_set_array_value_complex() on GPIO lines that are not configured as outputs. Ensure callers validate or configure the line direction as output before attempting to set array values.

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