CVE-2025-38056

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
18/06/2025
Last modified:
14/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> ASoC: SOF: Intel: hda: Fix UAF when reloading module<br /> <br /> hda_generic_machine_select() appends -idisp to the tplg filename by<br /> allocating a new string with devm_kasprintf(), then stores the string<br /> right back into the global variable snd_soc_acpi_intel_hda_machines.<br /> When the module is unloaded, this memory is freed, resulting in a global<br /> variable pointing to freed memory. Reloading the module then triggers<br /> a use-after-free:<br /> <br /> BUG: KFENCE: use-after-free read in string+0x48/0xe0<br /> <br /> Use-after-free read at 0x00000000967e0109 (in kfence-#99):<br /> string+0x48/0xe0<br /> vsnprintf+0x329/0x6e0<br /> devm_kvasprintf+0x54/0xb0<br /> devm_kasprintf+0x58/0x80<br /> hda_machine_select.cold+0x198/0x17a2 [snd_sof_intel_hda_generic]<br /> sof_probe_work+0x7f/0x600 [snd_sof]<br /> process_one_work+0x17b/0x330<br /> worker_thread+0x2ce/0x3f0<br /> kthread+0xcf/0x100<br /> ret_from_fork+0x31/0x50<br /> ret_from_fork_asm+0x1a/0x30<br /> <br /> kfence-#99: 0x00000000198a940f-0x00000000ace47d9d, size=64, cache=kmalloc-64<br /> <br /> allocated by task 333 on cpu 8 at 17.798069s (130.453553s ago):<br /> devm_kmalloc+0x52/0x120<br /> devm_kvasprintf+0x66/0xb0<br /> devm_kasprintf+0x58/0x80<br /> hda_machine_select.cold+0x198/0x17a2 [snd_sof_intel_hda_generic]<br /> sof_probe_work+0x7f/0x600 [snd_sof]<br /> process_one_work+0x17b/0x330<br /> worker_thread+0x2ce/0x3f0<br /> kthread+0xcf/0x100<br /> ret_from_fork+0x31/0x50<br /> ret_from_fork_asm+0x1a/0x30<br /> <br /> freed by task 1543 on cpu 4 at 141.586686s (6.665010s ago):<br /> release_nodes+0x43/0xb0<br /> devres_release_all+0x90/0xf0<br /> device_unbind_cleanup+0xe/0x70<br /> device_release_driver_internal+0x1c1/0x200<br /> driver_detach+0x48/0x90<br /> bus_remove_driver+0x6d/0xf0<br /> pci_unregister_driver+0x42/0xb0<br /> __do_sys_delete_module+0x1d1/0x310<br /> do_syscall_64+0x82/0x190<br /> entry_SYSCALL_64_after_hwframe+0x76/0x7e<br /> <br /> Fix it by copying the match array with devm_kmemdup_array() before we<br /> modify it.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.12 (including) 6.12.31 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.13 (including) 6.14.9 (excluding)
cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc7:*:*:*:*:*:*