CVE-2026-98528

gpio: cdev: fix kernel stack leak to user-space in error path

Published Oct 18, 2026 CVSS 3.1 · 3.3 Low EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

gpio: cdev: fix kernel stack leak to user-space in error path

If we fail to acquire the GPIO chip guard in gpio_desc_to_lineinfo(), we
return immediately before zeroing the info struct we'll end up passing
to the user-space later in lineinfo_get_v1(). This may leak the kernel
stack contents. Make gpio_desc_to_lineinfo() return int so that the
-ENODEV returned on failure to acquire the guard can be propagated to
the callers.

While not strictly necessary: move the memset() before trying to acquire
the SRCU read lock too for good measure.

Analysis

AI-generated

Technical impact

This vulnerability in the Linux kernel allows a kernel stack leak to user space when the GPIO chip guard cannot be acquired in gpio_desc_to_lineinfo(). The code returns early without zeroing the info structure that will later be provided to user‑space via lineinfo_get_v1(), so stack contents can be exposed. The exposed data may contain sensitive kernel information, such as secret keys or credentials, which constitutes an Information Disclosure weakness (CWE‑908).

Affected Systems

All Linux kernel builds that include the vulnerable gpio character device driver before the patch commit are affected. Without specific version range data, any kernel release prior to the integration of the commit that adds the memset fix may be impacted. Administrators should verify the kernel version against the official commit history or update to a kernel where the change has been applied.

Risk and Exploitability

The CVSS score is 3.3, and the EPSS score is < 1%, indicating a low probability of exploitation. The description does not explicitly state that a local user can interact with the GPIO subsystem, but based on the code context it is inferred that a local user able to open /dev/gpiochipN and invoke lineinfo_get_v1 with a bad descriptor could trigger the vulnerable path. Such an attacker would receive the uninitialized portion of the info structure, exposing kernel stack data. This does not provide privilege escalation but can leak privileged information; it is not currently listed in the CISA KEV catalog or known as an actively exploited vulnerability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the stabilised kernel patch that zeroes the info structure before exiting gpio_desc_to_lineinfo() and propagates its error code.
  • Upgrade the operating system to a kernel version that incorporates the commit fixing the leak, such as the latest stable release for the distribution. If an immediate update is not feasible, recompile the kernel from a source tree that includes the patch.
  • Restrict access to the GPIO character device nodes by enforcing appropriate file permissions or SELinux/AppArmor rules, thereby limiting the ability of unprivileged users to trigger the vulnerable code path.

Generated by OpenCVE AI on October 20, 2026 at 19:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-200
Type Values Removed Values Added
Weaknesses CWE-908
References
Metrics threat_severity

None

cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N'}

threat_severity

Low

Type Values Removed Values Added
Weaknesses CWE-200
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: gpio: cdev: fix kernel stack leak to user-space in error path If we fail to acquire the GPIO chip guard in gpio_desc_to_lineinfo(), we return immediately before zeroing the info struct we'll end up passing to the user-space later in lineinfo_get_v1(). This may leak the kernel stack contents. Make gpio_desc_to_lineinfo() return int so that the -ENODEV returned on failure to acquire the guard can be propagated to the callers. While not strictly necessary: move the memset() before trying to acquire the SRCU read lock too for good measure.
Title gpio: cdev: fix kernel stack leak to user-space in error path
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-908

    Use of Uninitialized Resource

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:21 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Low
Public date
Oct 18, 2026, 12:00 AM