CVE-2026-80563 in Linuxinfo

Summary

by MITRE • 08/26/2026

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/26/2026

This vulnerability represents a classic race condition leading to a use-after-free error within the Linux kernel's GPIO sloppy logic analyzer driver, specifically triggered through debugfs interactions during device unbinding operations. The core technical flaw lies in the lifecycle management of the per-device gpio_la_poll_priv structure and its interaction with the debugfs subsystem. The trigger file is created using debugfs_create_file_unsafe(), a function explicitly designed for cases where the caller manages object lifetime independently, but this responsibility was not correctly implemented by the driver developers. Consequently, when a user writes to the trigger file via the trigger_write() handler, the code dereferences gpio_la_poll_priv without holding any reference that would prevent its deallocation. Meanwhile, if an administrator initiates an unbind of the platform device through /sys/bus/platform/drivers/gpio-sloppy-logic-analyzer/unbind, the devres subsystem proceeds to free the priv object allocated with devm_kzalloc() immediately after debugfs_remove_recursive() returns. Because debugfs_create_file_unsafe does not install a full_proxy wrapper, there is no mechanism to wait for in-flight write operations to complete before removing the file entry. This creates a window where trigger_write can execute concurrently with gpio_la_poll_remove, allowing the handler to write into memory that has already been freed by the device resource management layer.

The operational impact of this vulnerability allows a local attacker with root privileges or access to debugfs and platform driver controls to cause kernel memory corruption. By racing an unbind operation against a write to the trigger file, an attacker can achieve arbitrary code execution or cause a system crash through a slab-use-after-free condition. The race is particularly dangerous because it involves user-space data being copied into kernel memory via memdup_user while the target structure has already been reclaimed by the kernel's memory management subsystem. This scenario falls squarely under CWE-416, Use After Free, as the program continues to use an object after it has been freed, leading to undefined behavior and potential security breaches. Furthermore, this vulnerability can be mapped to MITRE ATT&CK techniques related to privilege escalation or denial of service through kernel exploitation, specifically leveraging improper resource management during state transitions in device drivers.

The mitigation strategy implemented resolves the race condition by replacing debugfs_create_file_unsafe with standard debugfs_create_file. This change ensures that a full_proxy wrapper is installed for the file operations, which guarantees that debugfs_remove_recursive will drain any in-flight write handlers before returning control to the unbind routine. By ensuring that all pending writes complete before the device resources are released, the driver maintains proper synchronization between user-space interactions and kernel object lifecycles. This fix aligns with best practices for handling dynamic file systems within kernel modules, emphasizing the necessity of reference counting or synchronous removal mechanisms when dealing with shared data structures accessed from interruptible contexts like debugfs write handlers. The vulnerability was confirmed using Kernel Address Sanitizer (KASAN), which detected the slab-use-after-free write during testing, validating that the race condition is both real and exploitable under specific timing conditions involving sleepable memory allocation functions within the handler path.

Responsible

Linux

Reservation

08/26/2026

Disclosure

08/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!