gpiolib: don't report -ENOMEM for a requested line without a label

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

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

gpiolib: don't report -ENOMEM for a requested line without a label

gpiod_request_commit() sets GPIOD_FLAG_REQUESTED, calls ->request() and only then sets the label. A line in between has no label, so gpiochip_dup_line_label() passes NULL to kstrdup() and returns ERR_PTR(-ENOMEM), which for_each_hwgpio() then passes to kfree():

BUG: unable to handle page fault for address: ffcc73074355ffc8 Call Trace: gpio_sim_dbg_show gpiolib_seq_show seq_read_iter

Return NULL for such a line, as for an unrequested one.

Reproduced with gpio-sim: reading /sys/kernel/debug/gpio in a loop while lines are requested and released oopses within seconds; with this change, 100000 cycles pass.

ProductVersions
Linux Linux35b545332b809a439aa1bf3fde5305e6eb243cf0 to before 32eb5deaba546813b1aa59484e5150e7b44b0775 Affected35b545332b809a439aa1bf3fde5305e6eb243cf0 to before 930132f707c7ea67bc9cb8099ef784195cb6ca8c Affected35b545332b809a439aa1bf3fde5305e6eb243cf0 to before ed99cc40d65a23c2294fb022b020efd57c2c8b07 Affected35b545332b809a439aa1bf3fde5305e6eb243cf0 to before dae739137441667d67fbfcc4d303a0ecc6618662 Affected
Linux Linux6.9 Affectedbefore 6.9 Not Affected6.12.117 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.