CVE-2025-40249

linux: In the Linux kernel, the following vulnerability has been resolved: gpio: cdev: make sure the cdev fd is still activ...

CVE-2025-40249 is fixed in 31 products on 1 platform, first by RHSA-2026:4012, released December 4, 2025. It is not reported as exploited. Patch Radar priority: High.

High
CVSS
7.8
high
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0016
4th percentile

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.

Where it's fixed

ProductFixed inFixReleased
Linux
kernel · RHEL 10 6.12.0-124.43.1.el10_1 RHSA-2026:4012 Dec 4, 2025
kernel · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-abi-stablelists · almalinux 10 6.12.0-124.43.1.el10_1 ALSA-2026:4012 Mar 9, 2026
kernel-abi-stablelists · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-core · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-cross-headers · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-core · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-devel · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-devel-matched · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-modules · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-modules-core · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-modules-extra · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-debug-uki-virt · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-devel · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-devel-matched · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-doc · almalinux 10 6.12.0-124.43.1.el10_1 ALSA-2026:4012 Mar 9, 2026
kernel-doc · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-headers · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-modules · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-modules-core · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-modules-extra · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-modules-extra-matched · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-tools · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-tools-libs · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-tools-libs-devel · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-uki-virt · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
kernel-uki-virt-addons · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
libperf · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
linux · Debian 14 6.17.10-1 DEBIAN-CVE-2025-40249 Dec 4, 2025
perf · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
python3-perf · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
rtla · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026
rv · ol 10 0:6.12.0-124.43.1.el10_1 ELSA-2026-4012 Mar 10, 2026

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.