# CVE-2025-39765: ALSA: timer: fix ida\_free call while not allocated

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-09-11T16:56:20.738Z
- **Modified:** 2026-11-05T22:17:30.733Z

## Who should check

- Anyone running Linux \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< 34327b362ce2849a5eb02f47e800049e7a20a0ba; \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< af386b52531d14c4b20f11c452787b1b6dd4eb8d; \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< 5003a65790ed66be882d1987cc2ca86af0de3db1
- Anyone running Linux 6.12

## Description

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

ALSA: timer: fix ida\_free call while not allocated

In the snd\_utimer\_create() function, if the kasprintf() function return
NULL, snd\_utimer\_put\_id() will be called, finally use ida\_free()
to free the unallocated id 0.

the syzkaller reported the following information:
  ------------\[ cut here \]------------
  ida\_free called for id=0 which is not allocated.
  WARNING: CPU: 1 PID: 1286 at lib/idr.c:592 ida\_free+0x1fd/0x2f0 lib/idr.c:592
  Modules linked in:
  CPU: 1 UID: 0 PID: 1286 Comm: syz-executor164 Not tainted 6.15.8 \#3 PREEMPT(lazy)
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-4.fc42 04/01/2014
  RIP: 0010:ida\_free+0x1fd/0x2f0 lib/idr.c:592
  Code: f8 fc 41 83 fc 3e 76 69 e8 70 b2 f8 (...)
  RSP: 0018:ffffc900007f79c8 EFLAGS: 00010282
  RAX: 0000000000000000 RBX: 1ffff920000fef3b RCX: ffffffff872176a5
  RDX: ffff88800369d200 RSI: 0000000000000000 RDI: ffff88800369d200
  RBP: 0000000000000000 R08: ffffffff87ba60a5 R09: 0000000000000000
  R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
  R13: 0000000000000002 R14: 0000000000000000 R15: 0000000000000000
  FS:  00007f6f1abc1740(0000) GS:ffff8880d76a0000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 00007f6f1ad7a784 CR3: 000000007a6e2000 CR4: 00000000000006f0
  Call Trace:
   \<TASK\>
   snd\_utimer\_put\_id sound/core/timer.c:2043 \[inline\] \[snd\_timer\]
   snd\_utimer\_create+0x59b/0x6a0 sound/core/timer.c:2184 \[snd\_timer\]
   snd\_utimer\_ioctl\_create sound/core/timer.c:2202 \[inline\] \[snd\_timer\]
   \_\_snd\_timer\_user\_ioctl.isra.0+0x724/0x1340 sound/core/timer.c:2287 \[snd\_timer\]
   snd\_timer\_user\_ioctl+0x75/0xc0 sound/core/timer.c:2298 \[snd\_timer\]
   vfs\_ioctl fs/ioctl.c:51 \[inline\]
   \_\_do\_sys\_ioctl fs/ioctl.c:907 \[inline\]
   \_\_se\_sys\_ioctl fs/ioctl.c:893 \[inline\]
   \_\_x64\_sys\_ioctl+0x198/0x200 fs/ioctl.c:893
   do\_syscall\_x64 arch/x86/entry/syscall\_64.c:63 \[inline\]
   do\_syscall\_64+0x7b/0x160 arch/x86/entry/syscall\_64.c:94
   entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
  \[...\]

The utimer-\>id should be set properly before the kasprintf() function,
ensures the snd\_utimer\_put\_id() function will free the allocated id.

## Affected and fixed versions

- Linux: \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< 34327b362ce2849a5eb02f47e800049e7a20a0ba; \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< af386b52531d14c4b20f11c452787b1b6dd4eb8d; \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< 5003a65790ed66be882d1987cc2ca86af0de3db1 (cvelist)
- Linux: 6.12 (cvelist)

## Mitigation

- Upgrade Linux to 5003a65790ed66be882d1987cc2ca86af0de3db1 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-39765. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39765.md
Affected: Linux >= 37745918e0e7575bc40f38da93a99b9fa6406224, < 34327b362ce2849a5eb02f47e800049e7a20a0ba; >= 37745918e0e7575bc40f38da93a99b9fa6406224, < af386b52531d14c4b20f11c452787b1b6dd4eb8d; >= 37745918e0e7575bc40f38da93a99b9fa6406224, < 5003a65790ed66be882d1987cc2ca86af0de3db1; Linux 6.12
Fixed in: Linux 34327b362ce2849a5eb02f47e800049e7a20a0ba, Linux 5003a65790ed66be882d1987cc2ca86af0de3db1

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-39765 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< 34327b362ce2849a5eb02f47e800049e7a20a0ba; \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< af386b52531d14c4b20f11c452787b1b6dd4eb8d; \>= 37745918e0e7575bc40f38da93a99b9fa6406224, \< 5003a65790ed66be882d1987cc2ca86af0de3db1; Linux 6.12.

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

Yes. Fixed in Linux 34327b362ce2849a5eb02f47e800049e7a20a0ba, Linux 5003a65790ed66be882d1987cc2ca86af0de3db1. Upgrade Linux to 5003a65790ed66be882d1987cc2ca86af0de3db1 or later.

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

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

- patch: <https://git.kernel.org/stable/c/34327b362ce2849a5eb02f47e800049e7a20a0ba>
- patch: <https://git.kernel.org/stable/c/af386b52531d14c4b20f11c452787b1b6dd4eb8d>
- patch: <https://git.kernel.org/stable/c/5003a65790ed66be882d1987cc2ca86af0de3db1>

## 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-39765>

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