gpio: cdev: fix kernel stack leak to user-space in error path
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.
CVE-2026-98528
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-98528
Linux
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
Linux
Source reference: /containers/cna/affected/1/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.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "d83cee3d2bb131c7fca7e19f1e33dc7530fd7083",
"lessThan": "8460ee5216ab9a38263b01dca4b0a27e083f70f3",
"versionType": "git"
},
{
"status": "affected",
"version": "d83cee3d2bb131c7fca7e19f1e33dc7530fd7083",
"lessThan": "cf3d043582e106a0e57002bec8a6de8929ba3e1c",
"versionType": "git"
},
{
"status": "affected",
"version": "d83cee3d2bb131c7fca7e19f1e33dc7530fd7083",
"lessThan": "60a466f231905cd96ae6f0f3c44a710c97873dac",
"versionType": "git"
},
{
"status": "affected",
"version": "d83cee3d2bb131c7fca7e19f1e33dc7530fd7083",
"lessThan": "1feb5d39b05afd902ed9fc902ec5b15be03a4bdb",
"versionType": "git"
}
],
"programFiles": [
"drivers/gpio/gpiolib-cdev.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "6.9"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "6.9",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.12.112",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.55",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.2.9",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/gpio/gpiolib-cdev.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98528
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #38554 · Revision 1
- Added to Heist Feed
- Publisher date