CVE-2025-39713

Medium

In the Linux kernel, the following vulnerability has been resolved: media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt() In the interrupt handler rain_interrupt(), the buffer full check on rain->buf_len is performed before acquiring rain->buf_lock. This creates a Time-of-Check to Time-of-Use (TOCTOU) race condition, as rain->buf_len is concurrently accessed and modified in the work handler rain_irq_work_handler() under the same lock. Multiple interrupt invocations can race, with each reading buf_len before it becomes full and then proceeding. This can lead to both interrupts attempting to write to the buffer, incrementing buf_len beyond its capacity (DATA_SIZE) and causing a buffer overflow. Fix this bug by moving the spin_lock() to before the buffer full check. This ensures that the check and the subsequent buffer modification are performed atomically, preventing the race condition. An corresponding spin_unlock() is added to the overflow path to correctly release the lock. This possible bug was found by an experimental static analysis tool developed by our team.

Package Linux Kernel
Published 2025-09-05
Last modified 2026-05-12
CVSS version 3.1
Patch available
Yes

CVSS 3.1 score

4.7

out of 10
Medium
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Weakness type

CWE-367

CVE-2025-39713 is classified as CWE-367

See CWE-367 on MITRE CWE for full details on this weakness type.

Affected versions

Linux kernel versions 4.12 and later are affected. Fixed in 5.4.297, 5.10.241, 5.15.190, 6.1.149, 6.6.103, 6.12.44, 6.16.4, 6.17 and their respective stable series.

Affected from
≥ 4.12
Fixed in
✓ 5.4.297 5.4.x ✓ 5.10.241 5.10.x ✓ 5.15.190 5.15.x ✓ 6.1.149 6.1.x ✓ 6.6.103 6.6.x ✓ 6.12.44 6.12.x ✓ 6.16.4 6.16.x ✓ 6.17

References

The following references provide additional information about CVE-2025-39713 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.

Frequently asked questions

  • What is CVE-2025-39713?

    CVE-2025-39713 is a Medium severity Linux kernel vulnerability with a CVSS score of 4.7 out of 10 . It affects Linux kernel versions from 4.12 onward and has been patched in 5.4.297, 5.10.241, 5.15.190 and others. CVE-2025-39713 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • What is the CVSS score for CVE-2025-39713?

    CVE-2025-39713 has a CVSS score of 4.7 out of 10, rated Medium severity (CVSS 3.1). The vector string is CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H .

  • Is there a patch available for CVE-2025-39713?

    Yes — CVE-2025-39713 has been patched. Fixed versions include 5.4.297, 5.10.241, 5.15.190 and others. If you are running Linux kernel 4.12 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2025-39713 actively exploited?

    No — CVE-2025-39713 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.