CVE-2025-39713 | media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt()

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.

Published: 2025-09-05 Last update: 2026-05-12 Assigner: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Conclusion & alert: CVE-2025-39713 is rated Low Risk (19.8/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.02%). Mandatory action: Low composite risk—no urgent action required; patch on your normal maintenance cycle and revisit priority if CVSS or EPSS increases.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-39713

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-01-08 0.15% 0.02% -0.13%
2 2026-01-05 0.11% 0.15% +0.04%
3 2025-11-04 0.11%

Full EPSS history (4 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-39713

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.7 3.1 MEDIUM
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.0 3.6 [email protected]

Weakness enumeration for CVE-2025-39713

GitHub Security Advisory for CVE-2025-39713

GHSA-pf4v-7q2j-5rw9 · Severity: medium — In the Linux kernel, the following vulnerability has been resolved: media: rainshadow-cec: fix...

OS Trackers for CVE-2025-39713

vendor priority summary link
debian not yet assigned CVE-2025-39713 not yet assigned priority: Debian including 2 source packages (linux, linux-6.1), 6 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 6. https://security-tracker.debian.org/tracker/CVE-2025-39713
redhat medium https://access.redhat.com/security/cve/CVE-2025-39713
suse medium CVE-2025-39713 severity moderate: SUSE including 463 source package names (2.1.3-6.80:kernel-default-base-6.4.0-35.1.21.12, 2.1.3-7.57:kernel-default-6.4.0-35.1, …), 905 product×package rows across 184 product lines (Container suse/sl-micro/6.0/base-os-container, Container suse/sl-micro/6.0/kvm-os-container, … (184 product lines)): Fixed 619, Known Affected 231, First Fixed 21, Known Not Affected 17, Will Not Fix 17. https://www.suse.com/security/cve/CVE-2025-39713/
ubuntu medium CVE-2025-39713 medium priority: Ubuntu including 158 source packages (linux, linux-allwinner-5.19, …), 1414 status rows across 9 suites (bionic, focal, jammy, noble, plucky, questing, trusty, upstream, xenial): DNE 1017, ignored 177, released 150, needed 43, not-affected 24, needs-triage 2, pending 1. https://ubuntu.com/security/CVE-2025-39713

Affected software / configurations for CVE-2025-39713

Vendor Product Version Raw CPE
linux linux_kernel >= 4.12, < 5.4.297 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 5.5, < 5.10.241 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 5.11, < 5.15.190 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 5.16, < 6.1.149 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.2, < 6.6.103 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.7, < 6.12.44 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.13, < 6.16.4 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

References for CVE-2025-39713

URL Tags
https://git.kernel.org/stable/c/1c2769dc80255824542ea5a4ff1a07dcdeb1603f Patch
https://git.kernel.org/stable/c/2964dbe631fd21ad7873b1752b895548d3c12496 Patch
https://git.kernel.org/stable/c/3c3e33b7edca7a2d6a96801f287f9faeb684d655 Patch
https://git.kernel.org/stable/c/6aaef1a75985865d8c6c5b65fb54152060faba48 Patch
https://git.kernel.org/stable/c/7af160aea26c7dc9e6734d19306128cce156ec40 Patch
https://git.kernel.org/stable/c/ed905fe7cba03cf22ae0b84cf1b73cd1c070423a Patch
https://git.kernel.org/stable/c/fbc81e78d75bf28972bc22b1599559557b1a1b83 Patch
https://git.kernel.org/stable/c/ff9dd3db6cd4c6b54a2ecbc58151bea4ec63bc59 Patch
https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html Third Party Advisory
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html Third Party Advisory
https://cert-portal.siemens.com/productcert/html/ssa-032379.html
cvelogic Threat Intelligence