CVE-2025-39765

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-39765
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39765.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-39765
Downstream
Published
2025-09-11T16:56:20Z
Modified
2025-10-16T04:44:20.978557Z
Summary
ALSA: timer: fix ida_free call while not allocated
Details

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

ALSA: timer: fix ida_free call while not allocated

In the sndutimercreate() function, if the kasprintf() function return NULL, sndutimerputid() will be called, finally use idafree() to free the unallocated id 0.

the syzkaller reported the following information: ------------[ cut here ]------------ idafree called for id=0 which is not allocated. WARNING: CPU: 1 PID: 1286 at lib/idr.c:592 idafree+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:idafree+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> sndutimerputid sound/core/timer.c:2043 [inline] [sndtimer] sndutimercreate+0x59b/0x6a0 sound/core/timer.c:2184 [sndtimer] sndutimerioctlcreate sound/core/timer.c:2202 [inline] [sndtimer] _sndtimeruserioctl.isra.0+0x724/0x1340 sound/core/timer.c:2287 [sndtimer] sndtimeruserioctl+0x75/0xc0 sound/core/timer.c:2298 [sndtimer] vfsioctl fs/ioctl.c:51 [inline] _dosysioctl fs/ioctl.c:907 [inline] _sesysioctl fs/ioctl.c:893 [inline] _x64sysioctl+0x198/0x200 fs/ioctl.c:893 dosyscallx64 arch/x86/entry/syscall64.c:63 [inline] dosyscall64+0x7b/0x160 arch/x86/entry/syscall64.c:94 entrySYSCALL64after_hwframe+0x76/0x7e [...]

The utimer->id should be set properly before the kasprintf() function, ensures the sndutimerput_id() function will free the allocated id.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
37745918e0e7575bc40f38da93a99b9fa6406224
Fixed
34327b362ce2849a5eb02f47e800049e7a20a0ba
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
37745918e0e7575bc40f38da93a99b9fa6406224
Fixed
af386b52531d14c4b20f11c452787b1b6dd4eb8d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
37745918e0e7575bc40f38da93a99b9fa6406224
Fixed
5003a65790ed66be882d1987cc2ca86af0de3db1

Affected versions

v6.*

v6.11
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.10
v6.12.11
v6.12.12
v6.12.13
v6.12.14
v6.12.15
v6.12.16
v6.12.17
v6.12.18
v6.12.19
v6.12.2
v6.12.20
v6.12.21
v6.12.22
v6.12.23
v6.12.24
v6.12.25
v6.12.26
v6.12.27
v6.12.28
v6.12.29
v6.12.3
v6.12.30
v6.12.31
v6.12.32
v6.12.33
v6.12.34
v6.12.35
v6.12.36
v6.12.37
v6.12.38
v6.12.39
v6.12.4
v6.12.40
v6.12.41
v6.12.42
v6.12.43
v6.12.5
v6.12.6
v6.12.7
v6.12.8
v6.12.9
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.14
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.16.1
v6.16.2
v6.16.3
v6.17-rc1
v6.17-rc2

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.44
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.16.4