gpio: virtuser: fix UAF in configfs release path
In the Linux kernel, the following vulnerability has been resolved: gpio: virtuser: fix UAF in configfs release path The gpio-virtuser configfs release path uses guard(mutex) to protect the device structure. However, the device is freed before the guard cleanup runs, causing mutex_unlock() to operate on freed memory. Specifically, gpio_virtuser_device_config_group_release() destroys the mutex and frees the device while still inside the guard(mutex) scope. When the function returns, the guard cleanup invokes mutex_unlock(&dev->lock), resulting in a slab use-after-free. Limit the mutex lifetime by using a scoped_guard() only around the activation check, so that the lock is released before mutex_destroy() and kfree() are called.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.69, 6.18.9
- CVEs
- CVE-2026-23158
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 10:41 UTC · Revision 1
Source evidence
gpio: virtuser: fix UAF in configfs release path
core-osv · Original sourcePublished 14 Feb 2026, 16:01 UTC
In the Linux kernel, the following vulnerability has been resolved: gpio: virtuser: fix UAF in configfs release path The gpio-virtuser configfs release path uses guard(mutex) to protect the device structure. However, the device is freed before the guard cleanup runs, causing mutex_unlock() to operate on freed memory. Specifically, gpio_virtuser_device_config_group_release() destroys the mutex and frees the device while still inside the guard(mutex) scope. When the function returns, the guard cleanup invokes mutex_unlock(&dev->lock), resulting in a slab use-after-free. Limit the mutex lifetime by using a scoped_guard() only around the activation check, so that the lock is released before mutex_destroy() and kfree() are called.
osv:CVE-2026-23158
Kernel
Fixed versions: 6.12.69, 6.18.9
Complete source record
{
"id": "09ce25dabbc69d3c778307d25c7ead0110511181c9d55fb74509b4aad50c47b6",
"url": "https://osv.dev/vulnerability/CVE-2026-23158",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "gpio: virtuser: fix UAF in configfs release path",
"summary": "In the Linux kernel, the following vulnerability has been resolved: gpio: virtuser: fix UAF in configfs release path The gpio-virtuser configfs release path uses guard(mutex) to protect the device structure. However, the device is freed before the guard cleanup runs, causing mutex_unlock() to operate on freed memory. Specifically, gpio_virtuser_device_config_group_release() destroys the mutex and frees the device while still inside the guard(mutex) scope. When the function returns, the guard cleanup invokes mutex_unlock(&dev->lock), resulting in a slab use-after-free. Limit the mutex lifetime by using a scoped_guard() only around the activation check, so that the lock is released before mutex_destroy() and kfree() are called.",
"evidence": "osv:CVE-2026-23158",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.69",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-23158",
"aliases": [
"CVE-2026-23158"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "91581c4b3f29e2e22aeb1a62e842d529ca638b2d"
},
{
"fixed": "815a8e3bf72811d402b30bd4a53cde5e9df7a563"
},
{
"fixed": "7bec90f605cfb138006f5ba575f2310593347110"
},
{
"fixed": "53ad4a948a4586359b841d607c08fb16c5503230"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23158.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.11.0"
},
{
"fixed": "6.12.69"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23158.json"
}
}
],
"modified": "2026-10-28T02:30:28.024749053Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/53ad4a948a4586359b841d607c08fb16c5503230",
"https://git.kernel.org/stable/c/7bec90f605cfb138006f5ba575f2310593347110",
"https://git.kernel.org/stable/c/815a8e3bf72811d402b30bd4a53cde5e9df7a563",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23158.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-23158",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23158.json"
}
},
"related_cves": [
{
"value": "CVE-2026-23158",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 494618,
"published_at": "2026-02-14T16:01:24.568+00:00"
}