7.8

CVE-2025-40249: gpio: cdev: make sure the cdev fd is still active before emitting events

Deferred
AliasesUBUNTU-CVE-2025-40249DEBIAN-CVE-2025-40249
Published 04-12-2025Last modified 05-08-2026

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.

Priority
Routine

Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.14%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 7 · Related 6

Timeline

  1. 04-12-2025
    PublishedVulnerability first disclosed.
  2. 05-08-2026
    Last 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

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

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

No weakness data has been published for this record.

Affected systems

Version check

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

References

12 links
Show all 12 references