CVE-2025-38056: ASoC: SOF: Intel: hda: Fix UAF when reloading module

Published Jun 18, 2025
·
Updated

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

ASoC: SOF: Intel: hda: Fix UAF when reloading module

hdagenericmachineselect() appends -idisp to the tplg filename by allocating a new string with devmkasprintf(), then stores the string right back into the global variable sndsocacpiintelhdamachines. When the module is unloaded, this memory is freed, resulting in a global variable pointing to freed memory. Reloading the module then triggers a use-after-free:

BUG: KFENCE: use-after-free read in string+0x48/0xe0

Use-after-free read at 0x00000000967e0109 (in kfence-#99): string+0x48/0xe0 vsnprintf+0x329/0x6e0 devmkvasprintf+0x54/0xb0 devmkasprintf+0x58/0x80 hdamachineselect.cold+0x198/0x17a2 [sndsofintelhdageneric] sofprobework+0x7f/0x600 [sndsof] processonework+0x17b/0x330 workerthread+0x2ce/0x3f0 kthread+0xcf/0x100 retfromfork+0x31/0x50 retfromforkasm+0x1a/0x30

kfence-#99: 0x00000000198a940f-0x00000000ace47d9d, size=64, cache=kmalloc-64

allocated by task 333 on cpu 8 at 17.798069s (130.453553s ago): devmkmalloc+0x52/0x120 devmkvasprintf+0x66/0xb0 devmkasprintf+0x58/0x80 hdamachineselect.cold+0x198/0x17a2 [sndsofintelhdageneric] sofprobework+0x7f/0x600 [sndsof] processonework+0x17b/0x330 workerthread+0x2ce/0x3f0 kthread+0xcf/0x100 retfromfork+0x31/0x50 retfromforkasm+0x1a/0x30

freed by task 1543 on cpu 4 at 141.586686s (6.665010s ago): releasenodes+0x43/0xb0 devresreleaseall+0x90/0xf0 deviceunbindcleanup+0xe/0x70 devicereleasedriverinternal+0x1c1/0x200 driverdetach+0x48/0x90 busremovedriver+0x6d/0xf0 pciunregisterdriver+0x42/0xb0 dosysdeletemodule+0x1d1/0x310 dosyscall64+0x82/0x190 entrySYSCALL64afterhwframe+0x76/0x7e

Fix it by copying the match array with devmkmemduparray() before we modify it.

Affected Software

10 affected components
Intel Linux kernel
Linux Linux kernel>=6.12<6.12.31
Linux Linux kernel>=6.13<6.14.9
Linux Linux kernel=6.15-rc1
Linux Linux kernel=6.15-rc2
Linux Linux kernel=6.15-rc3
Linux Linux kernel=6.15-rc4
Linux Linux kernel=6.15-rc5
Linux Linux kernel=6.15-rc6
Linux Linux kernel=6.15-rc7

Event History

Jun 18, 2025
CVE Published
via MITRE·09:33 AM
Data Sourced
via MITRE·09:33 AM
Description
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38056?

CVE-2025-38056 has been classified with a severity rating that requires prompt attention due to a use-after-free vulnerability.

2

How do I fix CVE-2025-38056?

To fix CVE-2025-38056, update your Linux kernel to the latest version that includes the necessary patch.

3

What platforms are affected by CVE-2025-38056?

CVE-2025-38056 affects the Intel Linux kernel, particularly the components dealing with the hda module.

4

What are the potential impacts of CVE-2025-38056?

Exploitation of CVE-2025-38056 could lead to system instability or unauthorized access due to the use-after-free condition.

5

Is CVE-2025-38056 exploitable remotely?

Yes, CVE-2025-38056 could be exploited remotely, depending on the configuration and exposure of the affected device.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203