{"id":"CVE-2024-38388","state":"PUBLISHED","title":"ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: hda/cs_dsp_ctl: Use private_free for control cleanup\n\nUse the control private_free callback to free the associated data\nblock. This ensures that the memory won't leak, whatever way the\ncontrol gets destroyed.\n\nThe original implementation didn't actually remove the ALSA\ncontrols in hda_cs_dsp_control_remove(). It only freed the internal\ntracking structure. This meant it was possible to remove/unload the\namp driver while leaving its ALSA controls still present in the\nsoundcard. Obviously attempting to access them could cause segfaults\nor at least dereferencing stale pointers.","publishedAt":"2024-06-21T10:18:12.995Z","updatedAt":"2026-08-05T11:32:36.453Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"191dc1b2ff0fb35e7aff15a53224837637df8bff","versionType":"git"},{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"6e359be4975006ff72818e79dad8fe48293f2eb2","versionType":"git"},{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"3291486af5636540980ea55bae985f3eaa5b0740","versionType":"git"},{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"172811e3a557d8681a5e2d0f871dc04a2d17eb13","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/pci/hda/hda_cs_dsp_ctl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.0","versionType":"semver"},{"version":"6.1.93","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.33","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.4","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/pci/hda/hda_cs_dsp_ctl.c"]}],"references":["https://git.kernel.org/stable/c/191dc1b2ff0fb35e7aff15a53224837637df8bff","https://git.kernel.org/stable/c/6e359be4975006ff72818e79dad8fe48293f2eb2","https://git.kernel.org/stable/c/3291486af5636540980ea55bae985f3eaa5b0740","https://git.kernel.org/stable/c/172811e3a557d8681a5e2d0f871dc04a2d17eb13"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38388.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-38388","state":"PUBLISHED","datePublished":"2024-06-21T10:18:12.995Z","dateUpdated":"2026-08-05T11:32:36.453Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-21T10:12:11.500Z"},"containers":{"cna":{"title":"ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: hda/cs_dsp_ctl: Use private_free for control cleanup\n\nUse the control private_free callback to free the associated data\nblock. This ensures that the memory won't leak, whatever way the\ncontrol gets destroyed.\n\nThe original implementation didn't actually remove the ALSA\ncontrols in hda_cs_dsp_control_remove(). It only freed the internal\ntracking structure. This meant it was possible to remove/unload the\namp driver while leaving its ALSA controls still present in the\nsoundcard. Obviously attempting to access them could cause segfaults\nor at least dereferencing stale pointers."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"191dc1b2ff0fb35e7aff15a53224837637df8bff","versionType":"git"},{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"6e359be4975006ff72818e79dad8fe48293f2eb2","versionType":"git"},{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"3291486af5636540980ea55bae985f3eaa5b0740","versionType":"git"},{"version":"3233b978af23f11b4ad4f7f11a9a64bd05702b1f","status":"affected","lessThan":"172811e3a557d8681a5e2d0f871dc04a2d17eb13","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/pci/hda/hda_cs_dsp_ctl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.0","versionType":"semver"},{"version":"6.1.93","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.33","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.4","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/pci/hda/hda_cs_dsp_ctl.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/191dc1b2ff0fb35e7aff15a53224837637df8bff"},{"url":"https://git.kernel.org/stable/c/6e359be4975006ff72818e79dad8fe48293f2eb2"},{"url":"https://git.kernel.org/stable/c/3291486af5636540980ea55bae985f3eaa5b0740"},{"url":"https://git.kernel.org/stable/c/172811e3a557d8681a5e2d0f871dc04a2d17eb13"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached through ioctls (SNDRV_CTL_IOCTL_ELEM_READ/WRITE/INFO) on the local ALSA control device /dev/snd/controlC*, requiring local system access. There is no network-facing component in sound/pci/hda/hda_cs_dsp_ctl.c.\nAC:L - Once the amp driver is unbound the dangling kcontrol persists indefinitely on the sound card, so there is no race to win — the attacker freely grooms the kmalloc-32/kmalloc-192 slabs to reclaim the freed hda_cs_dsp_coeff_ctl and cs_dsp_coeff_ctl, then triggers the dereference at a time of their choosing, repeatably. Cirrus CS35L41/CS35L56 amps are present on a very large population of current laptops, so the affected configuration is common rather than exotic.\nPR:L - Exploitation only requires the ability to open /dev/snd/controlC* and issue element read/write ioctls, which snd_ctl_elem_read()/snd_ctl_elem_write() perform with no capability check — any local user in the audio group or with an active logind session qualifies. No root or CAP_SYS_ADMIN is needed to reach the use-after-free.\nUI:N - The attacker performs the entire exploit themselves with ioctls on the stale control; no victim needs to open a file, mount a filesystem, or otherwise interact. The driver-unbind that leaves the stale control behind is an ambient system state (module update, driver reload, codec rebind), not an action the attacker must social-engineer a victim into performing during the attack.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; there is no VM, IOMMU, or sandbox boundary crossed. Standard kernel-local privilege escalation keeps the scope unchanged.\nC:H - After reclaiming the freed cs_dsp_coeff_ctl the attacker controls ctl->cache and ctl->len, and cs_dsp_coeff_read_ctrl() does memcpy(buf, ctl->cache + off*4, len) into the control value buffer, which snd_ctl_ioctl_elem_read() copies straight to userspace — an arbitrary kernel memory read primitive.\nI:H - cs_dsp_coeff_write_ctrl() does memcpy(ctl->cache + off*4, buf, len) with an attacker-controlled destination pointer and attacker-supplied data, giving an arbitrary kernel write; additionally the stale kcontrol's get/put/info function pointers reference the unloaded snd-hda-cs-dsp-ctls module text, allowing indirect control-flow hijack into freed executable memory.\nA:H - Even without successful heap grooming, dereferencing the freed hda_cs_dsp_coeff_ctl and cs_dsp_coeff_ctl, taking a mutex on freed memory, and calling into unloaded module text reliably produces an oops or panic. Any unprivileged user with audio access can crash the machine on demand."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:32:36.453Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.1.93"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.6.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.9.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":3.3,"attackVector":"LOCAL","baseSeverity":"LOW","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"LOW","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-24T15:21:00.338175Z","id":"CVE-2024-38388","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-06T16:48:24.756Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/191dc1b2ff0fb35e7aff15a53224837637df8bff","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/6e359be4975006ff72818e79dad8fe48293f2eb2","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/3291486af5636540980ea55bae985f3eaa5b0740","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/172811e3a557d8681a5e2d0f871dc04a2d17eb13","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:04:25.255Z"}}]}}}