CVE-2025-40249: gpio: cdev: make sure the cdev fd is still active before emitting events
Vulnerability summary
CVE-2025-40249 is a high (CVSS 7.8) vulnerability in linux. EPSS estimates a 0.14% chance of exploitation in the next 30 days, higher than 3.7% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 7 · Related 6Timeline
- 04-12-2025PublishedVulnerability first disclosed.
- 05-08-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.14%
Chance of exploitation in the next 30 days
Percentile
4%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.14% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeNo weakness data has been published for this record.
Affected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu107 products
- linux< 6.17.0-19.19
- linux-allwinner-5.19All versions (No fix recorded)
- linux-aws< 6.17.0-1009.9
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Debian1 product
- linux< 6.17.10-1
Linux1 product
- linux≥ 40b7c49950bd56c984b1f6722f865b922879260e, < dccc6daa8afa0f64c432e4c867f275747e3415e1 | ≥ 40b7c49950bd56c984b1f6722f865b922879260e, < d4cd0902c156b2ca60fdda8cd8b5bcb4b0e9ed64 | 6.13
3 vendors · 109 products