# CVE-2025-39995: media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.32% (percentile 18, 2026-11-26)
- **Published:** 2025-10-15T07:58:20.365Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 9205fb6e617a1c596d9a9ad2a160ee696e09d520; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 70913586c717dd25cfbade7a418e92cc9c99398a; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 663faf1179db9663a3793c75e9bc869358bad910; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 3d17701c156579969470e58b3a906511f8bc018d; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 228d06c4cbfc750f1216a3fd91b4693b0766d2f6; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< f92181c0e13cad9671d07b15be695a97fc2534a3; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< f3f3f00bcabbd2ce0a77a2ac7a6797b8646bfd8b; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 2610617effb4454d2f1c434c011ccb5cc7140711; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 79d10f4f21a92e459b2276a77be62c59c1502c9d
- Anyone running Linux 4.3

## Description

In the Linux kernel, the following vulnerability has been resolved:

media: i2c: tc358743: Fix use-after-free bugs caused by orphan timer in probe

The state-\>timer is a cyclic timer that schedules work\_i2c\_poll and
delayed\_work\_enable\_hotplug, while rearming itself. Using timer\_delete()
fails to guarantee the timer isn't still running when destroyed, similarly
cancel\_delayed\_work() cannot ensure delayed\_work\_enable\_hotplug has
terminated if already executing. During probe failure after timer
initialization, these may continue running as orphans and reference the
already-freed tc358743\_state object through tc358743\_irq\_poll\_timer.

The following is the trace captured by KASAN.

BUG: KASAN: slab-use-after-free in \_\_run\_timer\_base.part.0+0x7d7/0x8c0
Write of size 8 at addr ffff88800ded83c8 by task swapper/1/0
...
Call Trace:
 \<IRQ\>
 dump\_stack\_lvl+0x55/0x70
 print\_report+0xcf/0x610
 ? \_\_pfx\_sched\_balance\_find\_src\_group+0x10/0x10
 ? \_\_run\_timer\_base.part.0+0x7d7/0x8c0
 kasan\_report+0xb8/0xf0
 ? \_\_run\_timer\_base.part.0+0x7d7/0x8c0
 \_\_run\_timer\_base.part.0+0x7d7/0x8c0
 ? rcu\_sched\_clock\_irq+0xb06/0x27d0
 ? \_\_pfx\_\_\_run\_timer\_base.part.0+0x10/0x10
 ? try\_to\_wake\_up+0xb15/0x1960
 ? tmigr\_update\_events+0x280/0x740
 ? \_raw\_spin\_lock\_irq+0x80/0xe0
 ? \_\_pfx\_\_raw\_spin\_lock\_irq+0x10/0x10
 tmigr\_handle\_remote\_up+0x603/0x7e0
 ? \_\_pfx\_tmigr\_handle\_remote\_up+0x10/0x10
 ? sched\_balance\_trigger+0x98/0x9f0
 ? sched\_tick+0x221/0x5a0
 ? \_raw\_spin\_lock\_irq+0x80/0xe0
 ? \_\_pfx\_\_raw\_spin\_lock\_irq+0x10/0x10
 ? tick\_nohz\_handler+0x339/0x440
 ? \_\_pfx\_tmigr\_handle\_remote\_up+0x10/0x10
 \_\_walk\_groups.isra.0+0x42/0x150
 tmigr\_handle\_remote+0x1f4/0x2e0
 ? \_\_pfx\_tmigr\_handle\_remote+0x10/0x10
 ? ktime\_get+0x60/0x140
 ? lapic\_next\_event+0x11/0x20
 ? clockevents\_program\_event+0x1d4/0x2a0
 ? hrtimer\_interrupt+0x322/0x780
 handle\_softirqs+0x16a/0x550
 irq\_exit\_rcu+0xaf/0xe0
 sysvec\_apic\_timer\_interrupt+0x70/0x80
 \</IRQ\>
...

Allocated by task 141:
 kasan\_save\_stack+0x24/0x50
 kasan\_save\_track+0x14/0x30
 \_\_kasan\_kmalloc+0x7f/0x90
 \_\_kmalloc\_node\_track\_caller\_noprof+0x198/0x430
 devm\_kmalloc+0x7b/0x1e0
 tc358743\_probe+0xb7/0x610  i2c\_device\_probe+0x51d/0x880
 really\_probe+0x1ca/0x5c0
 \_\_driver\_probe\_device+0x248/0x310
 driver\_probe\_device+0x44/0x120
 \_\_device\_attach\_driver+0x174/0x220
 bus\_for\_each\_drv+0x100/0x190
 \_\_device\_attach+0x206/0x370
 bus\_probe\_device+0x123/0x170
 device\_add+0xd25/0x1470
 i2c\_new\_client\_device+0x7a0/0xcd0
 do\_one\_initcall+0x89/0x300
 do\_init\_module+0x29d/0x7f0
 load\_module+0x4f48/0x69e0
 init\_module\_from\_file+0xe4/0x150
 idempotent\_init\_module+0x320/0x670
 \_\_x64\_sys\_finit\_module+0xbd/0x120
 do\_syscall\_64+0xac/0x280
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

Freed by task 141:
 kasan\_save\_stack+0x24/0x50
 kasan\_save\_track+0x14/0x30
 kasan\_save\_free\_info+0x3a/0x60
 \_\_kasan\_slab\_free+0x3f/0x50
 kfree+0x137/0x370
 release\_nodes+0xa4/0x100
 devres\_release\_group+0x1b2/0x380
 i2c\_device\_probe+0x694/0x880
 really\_probe+0x1ca/0x5c0
 \_\_driver\_probe\_device+0x248/0x310
 driver\_probe\_device+0x44/0x120
 \_\_device\_attach\_driver+0x174/0x220
 bus\_for\_each\_drv+0x100/0x190
 \_\_device\_attach+0x206/0x370
 bus\_probe\_device+0x123/0x170
 device\_add+0xd25/0x1470
 i2c\_new\_client\_device+0x7a0/0xcd0
 do\_one\_initcall+0x89/0x300
 do\_init\_module+0x29d/0x7f0
 load\_module+0x4f48/0x69e0
 init\_module\_from\_file+0xe4/0x150
 idempotent\_init\_module+0x320/0x670
 \_\_x64\_sys\_finit\_module+0xbd/0x120
 do\_syscall\_64+0xac/0x280
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
...

Replace timer\_delete() with timer\_delete\_sync() and cancel\_delayed\_work()
with cancel\_delayed\_work\_sync() to ensure proper termination of timer and
work items before resource cleanup.

This bug was initially identified through static analysis. For reproduction
and testing, I created a functional emulation of the tc358743 device via a
kernel module and introduced faults through the debugfs interface.

## Affected and fixed versions

- Linux: \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 9205fb6e617a1c596d9a9ad2a160ee696e09d520; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 70913586c717dd25cfbade7a418e92cc9c99398a; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 663faf1179db9663a3793c75e9bc869358bad910; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 3d17701c156579969470e58b3a906511f8bc018d; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 228d06c4cbfc750f1216a3fd91b4693b0766d2f6; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< f92181c0e13cad9671d07b15be695a97fc2534a3; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< f3f3f00bcabbd2ce0a77a2ac7a6797b8646bfd8b; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 2610617effb4454d2f1c434c011ccb5cc7140711; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 79d10f4f21a92e459b2276a77be62c59c1502c9d (cvelist)
- Linux: 4.3 (cvelist)

## Mitigation

- Upgrade Linux to 79d10f4f21a92e459b2276a77be62c59c1502c9d or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-39995. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39995.md
Affected: Linux >= d32d98642de66048f9534a05f3641558e811bbc9, < 9205fb6e617a1c596d9a9ad2a160ee696e09d520; >= d32d98642de66048f9534a05f3641558e811bbc9, < 70913586c717dd25cfbade7a418e92cc9c99398a; >= d32d98642de66048f9534a05f3641558e811bbc9, < 663faf1179db9663a3793c75e9bc869358bad910; >= d32d98642de66048f9534a0…
Fixed in: Linux 9205fb6e617a1c596d9a9ad2a160ee696e09d520, Linux 70913586c717dd25cfbade7a418e92cc9c99398a, Linux 663faf1179db9663a3793c75e9bc869358bad910, Linux 3d17701c156579969470e58b3a906511f8bc018d, Linux 228d06c4cbfc750f1216a3fd91b4693b0766d2f6, Linux 2610617effb4454d2f1c434c011ccb5cc7140711, Linux 79d10…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-39995 being exploited?

There is no confirmed exploitation: CVE-2025-39995 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-39995?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-39995?

Linux \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 9205fb6e617a1c596d9a9ad2a160ee696e09d520; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 70913586c717dd25cfbade7a418e92cc9c99398a; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 663faf1179db9663a3793c75e9bc869358bad910; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 3d17701c156579969470e58b3a906511f8bc018d; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 228d06c4cbfc750f1216a3fd91b4693b0766d2f6; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< f92181c0e13cad9671d07b15be695a97fc2534a3; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< f3f3f00bcabbd2ce0a77a2ac7a6797b8646bfd8b; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 2610617effb4454d2f1c434c011ccb5cc7140711; \>= d32d98642de66048f9534a05f3641558e811bbc9, \< 79d10f4f21a92e459b2276a77be62c59c1502c9d; Linux 4.3.

### Is there a fix for CVE-2025-39995?

Yes. Fixed in Linux 9205fb6e617a1c596d9a9ad2a160ee696e09d520, Linux 70913586c717dd25cfbade7a418e92cc9c99398a, Linux 663faf1179db9663a3793c75e9bc869358bad910, Linux 3d17701c156579969470e58b3a906511f8bc018d, Linux 228d06c4cbfc750f1216a3fd91b4693b0766d2f6, Linux 2610617effb4454d2f1c434c011ccb5cc7140711, Linux 79d10f4f21a92e459b2276a77be62c59c1502c9d. Upgrade Linux to 79d10f4f21a92e459b2276a77be62c59c1502c9d or later.

### How do I check if I'm affected by CVE-2025-39995?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/9205fb6e617a1c596d9a9ad2a160ee696e09d520>
- other: <https://git.kernel.org/stable/c/70913586c717dd25cfbade7a418e92cc9c99398a>
- other: <https://git.kernel.org/stable/c/663faf1179db9663a3793c75e9bc869358bad910>
- other: <https://git.kernel.org/stable/c/3d17701c156579969470e58b3a906511f8bc018d>
- other: <https://git.kernel.org/stable/c/228d06c4cbfc750f1216a3fd91b4693b0766d2f6>
- other: <https://git.kernel.org/stable/c/f92181c0e13cad9671d07b15be695a97fc2534a3>
- other: <https://git.kernel.org/stable/c/f3f3f00bcabbd2ce0a77a2ac7a6797b8646bfd8b>
- other: <https://git.kernel.org/stable/c/2610617effb4454d2f1c434c011ccb5cc7140711>
- other: <https://git.kernel.org/stable/c/79d10f4f21a92e459b2276a77be62c59c1502c9d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-39995>

HTML: <https://flawdb.com/CVE-2025-39995> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-39995>
