Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-40249

published high CVSS 3.1 · 7.8

gpio: cdev: make sure the cdev fd is still active before emitting events

Published
04 Dec 2025, 16:08:12 UTC
Updated
05 Aug 2026, 12:08:51 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux40b7c49950bd56c984b1f6722f865b922879260e to < dccc6daa8afa0f64c432e4c867f275747e3415e1 · 40b7c49950bd56c984b1f6722f865b922879260e to < d4cd0902c156b2ca60fdda8cd8b5bcb4b0e9ed64 · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.13 (affected) · 0 to < 6.13 (unaffected · semver) · 6.17.10 through 6.17.* (unaffected · semver) · 6.18 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
AlmaLinux 10 kernel-abi-stablelists Advisory build 6.12.0-124.43.1.el10_1 ALSA-2026:4012
Oracle Linux 10 kernelx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Red Hat Enterprise Linux RHEL-10 kernelaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
AlmaLinux 10 kernel-doc Advisory build 6.12.0-124.43.1.el10_1 ALSA-2026:4012
Show 96 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Oracle Linux 10 kernel-abi-stablelistsx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-corex86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-cross-headersaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-cross-headersx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debugx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-corex86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-develx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-devel-matchedx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-modulesx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-modules-corex86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-modules-extrax86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-debug-uki-virtx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-develx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-devel-matchedx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-docx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-headersaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-headersx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-modulesx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-modules-corex86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-modules-extrax86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-modules-extra-matchedx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-toolsaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-toolsx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-tools-libsaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-tools-libsx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-tools-libs-develaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-tools-libs-develx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-uki-virtx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 kernel-uki-virt-addonsx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 libperfaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 libperfx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 perfaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 perfx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 python3-perfaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 python3-perfx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 rtlaaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 rtlax86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 rvaarch64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Oracle Linux 10 rvx86_64 Advisory build 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012
Red Hat Enterprise Linux RHEL-10 kernelppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernels390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernelsrc Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernelx86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64kaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debugaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-debuginfoaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-develaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-devel-matchedaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-modulesaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-modules-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debug-modules-extraaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-debuginfoaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-develaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-devel-matchedaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-modulesaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-modules-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-64k-modules-extraaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-abi-stablelistsnoarch Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-coreppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-cores390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-corex86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debugaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debugppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debugs390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debugx86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-coreppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-cores390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-corex86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-debuginfoaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-debuginfoppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-debuginfos390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-debuginfox86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-develaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-develppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-devels390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-develx86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-devel-matchedaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-devel-matchedppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-devel-matcheds390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-devel-matchedx86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modulesaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modulesppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-moduless390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modulesx86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-coreaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-coreppc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-cores390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-corex86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-extraaarch64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-extrappc64le Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-extras390x Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012
Red Hat Enterprise Linux RHEL-10 kernel-debug-modules-extrax86_64 Advisory build 6.12.0-124.43.1.el10_1 RHSA-2026:4012

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

In the Linux kernel, the following vulnerability has been resolved: gpio: cdev: make sure the cdev fd is still active before emitting events With the final call to fput() on a file descriptor, the release action may be deferred and scheduled on a work queue. The reference count of that descriptor is still zero and it must not be used. It's possible that a GPIO change, we want to notify the user-space about, happens AFTER the reference count on the file descriptor associated with the character device went down to zero but BEFORE the .release() callback was called from the workqueue and so BEFORE we unregistered from the notifier. Using the regular get_file() routine in this situation triggers the following warning: struct file::f_count incremented from zero; use-after-free condition present! So use the get_file_active() variant that will return NULL on file descriptors that have been or are being released.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

12

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerability is reached through the GPIO character device `/dev/gpiochipN` via `open()`, `ioctl()` and `close()`, requiring local access to the system. There is no network-facing path to the GPIO line-state notifier chain. AC:L - The attacker controls both sides of the race — one thread loops open/`GPIO_V2_GET_LINEINFO_WATCH_IOCTL`/close while another loops line request/release/set-config to fire `gpiod_line_state_notify()` — and can retry indefinitely; the fput-to-release window can additionally be stretched to a full jiffy by forcing the `schedule_delayed_work(&delayed_fput_work, 1)` path, and the reporter hit the condition during normal operation. PR:L - No capability check exists anywhere in `gpio_chrdev_open()` or `gpio_ioctl()` — only file permissions on `/dev/gpiochipN`, which embedded, IoT, automotive and Raspberry-Pi-class deployments routinely grant to a non-root `gpio` group or to unprivileged libgpiod control daemons. A basic unprivileged local account with that group membership is sufficient. UI:N - The attacker performs every step itself — opening the chardev, arming the line watch, generating the line-state change, and closing the fd. No victim action or cooperation is needed. S:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; there is no crossing of a VM, IOMMU, or sandbox boundary. C:H - This is a use-after-free on both the `struct file` and the ~9.4 KB `gpio_chardev_data` object; a resprayed `cdev` lets `kfifo_in_spinlocked()` and `fput(cdev->fp)` read through attacker-chosen pointers, and `wake_up_poll()` on the freed wait queue yields a controlled call primitive, enabling arbitrary kernel memory disclosure. I:H - The queued work writes a 288-byte event record (with an attacker-supplied 32-byte consumer label) through the freed object's kfifo `data` pointer and performs a refcount decrement through a dangling `struct file *`, giving arbitrary-write and function-pointer-hijack primitives suitable for privilege escalation. A:H - In the common case the bug produces a `refcount_t` WARN ("f_count incremented from zero; use-after-free condition present!") — an immediate panic under `panic_on_warn` — followed by use-after-free accesses to a freed spinlock, kfifo and wait queue that reliably oops or panic the kernel, and the sequence is repeatable at will.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 40b7c49950bd56c984b1f6722f865b922879260e to < dccc6daa8afa0f64c432e4c867f275747e3415e1 (affected · git)40b7c49950bd56c984b1f6722f865b922879260e to < d4cd0902c156b2ca60fdda8cd8b5bcb4b0e9ed64 (affected · git)Default: unaffected Linux · cna
Linux Linux 6.13 (affected)0 to < 6.13 (unaffected · semver)6.17.10 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

gpio: cdev: make sure the cdev fd is still active before emitting events

Provenance

Schema
5.2
Searchable
yes
Content hash
b9b0ee45eb665e4b9ee0fac9c803003cee45eb5f6279f19a7b355b516857e088
Ingested
23 Sep 2026, 08:48:04 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected