CVE-2024-39495: greybus: Fix use-after-free bug in gb_interface_release due to race condition.
In the Linux kernel, the following vulnerability has been resolved:
greybus: Fix use-after-free bug in gb_interface_release due to race condition.
In gb_interface_create, &intf->mode_switch_completion is bound with
gb_interface_mode_switch_work. Then it will be started by
gb_interface_request_mode_switch. Here is the relevant code.
if (!queue_work(system_long_wq, &intf->mode_switch_work)) {
...
}
If we call gb_interface_release to make cleanup, there may be an
unfinished work. This function will call kfree to free the object
"intf". However, if gb_interface_mode_switch_work is scheduled to
run after kfree, it may cause use-after-free error as
gb_interface_mode_switch_work will use the object "intf".
The possible execution flow that may lead to the issue is as follows:
CPU0 CPU1
| gb_interface_create
| gb_interface_request_mode_switch
gb_interface_release |
kfree(intf) (free) |
| gb_interface_mode_switch_work
| mutex_lock(&intf->mutex) (use)
Fix it by canceling the work before kfree.
Security readout for executives and security teams
Plain-English summary
A race in the Linux kernel’s Greybus interface cleanup can leave background work using memory after it has been freed. A local, low-privileged attacker may potentially cause a crash or compromise confidentiality and integrity, but the supplied sources do not demonstrate successful exploitation.
Executive priority
Schedule prompt remediation for systems using Greybus, especially those allowing untrusted local users. Treat general-purpose systems without active Greybus use as lower practical exposure after validation. This is high severity, but the supplied evidence does not support emergency treatment based on active exploitation.
Technical view
The Greybus mode-switch worker retains access to the interface object. During a timing race, gb_interface_release can free that object before the queued worker runs, producing a CWE-416 use-after-free. The kernel fix cancels pending mode-switch work before freeing the object. CVSS 3.1 is 7.8 with local access and low privileges required.
Likely exposure
Exposure is most likely where an affected Linux kernel includes and actively uses Greybus interface mode switching. The supplied version data identifies affected releases from 4.9 through 6.10, with several fixed stable releases listed. Confirm status against the exact distribution kernel because backports can change vulnerability status.
Exploitation context
The CVSS vector requires local access and low privileges, with no user interaction. Exploitation depends on winning a cleanup-versus-worker timing race. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public exploit.
Researcher notes
The failure window is between freeing the Greybus interface in gb_interface_release and later execution of gb_interface_mode_switch_work, which accesses the freed object’s mutex. Stable fixes cancel outstanding work before kfree. The supplied affected-version list contains ambiguous entries, including “0” and repeated commit identifiers; use branch-specific commits or distribution advisories for authoritative mapping.
Mitigation direction
Install a vendor-supported kernel containing the applicable stable fix.
Prioritize systems that include and actively use Greybus interfaces.
Consult the Linux distribution’s advisory for exact fixed package versions.
Restrict untrusted local access until affected systems are updated.
Validation and detection
Record each system’s exact kernel and distribution package version.
Check whether Greybus support is built, loaded, or operationally used.
Compare kernel provenance against the cited stable fixes or vendor backports.
Confirm the updated kernel is running after installation and reboot.
Monitor kernel logs for crashes or memory-safety reports involving Greybus.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
2ADP providers
9Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.