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

gpio: sloppy-logic-analyzer: fix use-after-free via debugfs trigger on unbind

The "trigger" debugfs file has a hand-rolled ->write handler
(trigger_write()) that dereferences the per-device gpio_la_poll_priv. The
file is created with debugfs_create_file_unsafe(), and the handler never
takes a debugfs reference. Nothing keeps the object alive while the
handler runs.

priv is allocated with devm_kzalloc(). devres frees it when the platform
device is unbound. debugfs_create_file_unsafe() installs no full_proxy
wrapper, so debugfs_remove_recursive() in gpio_la_poll_remove() does not
wait for an in-flight trigger_write(). The blob_lock taken there does not
help, because trigger_write() never takes it. A write that races an unbind
therefore writes into freed memory:

trigger_write() gpio_la_poll_remove()
priv = m->private
buf = memdup_user() [may sleep]
mutex_lock(&priv->blob_lock)
debugfs_remove_recursive() [no wait]
mutex_unlock(&priv->blob_lock)
(remove returns; devres frees priv)
priv->trig_data = buf <-- use-after-free write
priv->trig_len = count

The race is reachable by root via
/sys/bus/platform/drivers/gpio-sloppy-logic-analyzer/unbind.

Create "trigger" with debugfs_create_file() instead. Its full_proxy
wrapper makes debugfs_remove_recursive() drain any in-flight ->write
before it returns.

The use-after-free is confirmed under KASAN with a minimal reproducer of
the same debugfs_create_file_unsafe() plus devm_kzalloc() pattern
(available on request); it produces a slab-use-after-free write in the
handler.
Published: 2026-08-26
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw lies in the sloppy‑logic‑analyzer driver for Linux kernels; the debugfs interface’s write handler performs a write into a private data structure that is freed during device unbinding. The handler never acquires a debugfs reference and uses a hand‑rolled file creation that omits the necessary proxy wrapper. This allows a race condition where a root user writes to /sys/bus/platform/drivers/gpio-sloppy-logic-analyzer/unbind followed by a write to the “trigger” debugfs file, causing a use‑after‑free write into freed kernel memory. The resulting memory corruption can be abused by a privileged attacker to corrupt kernel objects or execute arbitrary code. The description confirms this via KASAN traces and a reproducible exploit.

Affected Systems

All Linux kernel versions that include the sloppy‑logic‑analyzer driver before the patch that replaces debugfs_create_file_unsafe() with the safe debugfs_create_file(). No specific version numbers are given, so any kernel released prior to the corresponding commit should be regarded as affected.

Risk and Exploitability

The defect is local and requires root or an equivalently privileged user because the attacker must write to the platform driver’s unbind file. The use‑after‑free enables memory corruption and potentially arbitrary code execution within the kernel. While no EPSS score is available and the vulnerability is not listed in CISA’s KEV catalog, the impact is severe. The attack can be performed by any local attacker with root rights, but remote exploitation would not be possible without additional code‑execution paths. The lack of an exploitation probability score indicates that the exploit is not yet widely observed, yet the privilege‑escalation potential warrants immediate action.

Generated by OpenCVE AI on August 26, 2026 at 16:29 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that contains the fix that swaps debugfs_create_file_unsafe() for debugfs_create_file() in the sloppy‑logic‑analyzer driver
  • If an update is not possible, disable the faulty driver by removing it from the kernel configuration or unloading it with rmmod or sysfs unbind
  • Configure debugfs access control so that only privileged users can write to debugfs files, reducing the surface for accidental or malicious use‑after‑free writes

Generated by OpenCVE AI on August 26, 2026 at 16:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 26 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Wed, 26 Aug 2026 14:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: gpio: sloppy-logic-analyzer: fix use-after-free via debugfs trigger on unbind The "trigger" debugfs file has a hand-rolled ->write handler (trigger_write()) that dereferences the per-device gpio_la_poll_priv. The file is created with debugfs_create_file_unsafe(), and the handler never takes a debugfs reference. Nothing keeps the object alive while the handler runs. priv is allocated with devm_kzalloc(). devres frees it when the platform device is unbound. debugfs_create_file_unsafe() installs no full_proxy wrapper, so debugfs_remove_recursive() in gpio_la_poll_remove() does not wait for an in-flight trigger_write(). The blob_lock taken there does not help, because trigger_write() never takes it. A write that races an unbind therefore writes into freed memory: trigger_write() gpio_la_poll_remove() priv = m->private buf = memdup_user() [may sleep] mutex_lock(&priv->blob_lock) debugfs_remove_recursive() [no wait] mutex_unlock(&priv->blob_lock) (remove returns; devres frees priv) priv->trig_data = buf <-- use-after-free write priv->trig_len = count The race is reachable by root via /sys/bus/platform/drivers/gpio-sloppy-logic-analyzer/unbind. Create "trigger" with debugfs_create_file() instead. Its full_proxy wrapper makes debugfs_remove_recursive() drain any in-flight ->write before it returns. The use-after-free is confirmed under KASAN with a minimal reproducer of the same debugfs_create_file_unsafe() plus devm_kzalloc() pattern (available on request); it produces a slab-use-after-free write in the handler.
Title gpio: sloppy-logic-analyzer: fix use-after-free via debugfs trigger on unbind
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-26T14:37:27.759Z

Reserved: 2026-08-26T14:34:25.767Z

Link: CVE-2026-80563

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-26T15:17:11.310

Modified: 2026-08-26T15:17:11.310

Link: CVE-2026-80563

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-26T16:30:09Z

Weaknesses