{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-40045", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T07:20:57.154Z", "datePublished": "2025-10-28T11:48:23.431Z", "dateUpdated": "2026-08-05T12:07:18.382Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T12:07:18.382Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: codecs: wcd937x: set the comp soundwire port correctly\n\nFor some reason we endup with setting soundwire port for\nHPHL_COMP and HPHR_COMP as zero, this can potentially result\nin a memory corruption due to accessing and setting -1 th element of\nport_map array." } ], "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 only through an ALSA control-element write ioctl (SNDRV_CTL_IOCTL_ELEM_WRITE) on /dev/snd/controlC*, which requires local access to the device node. There is no network or remote-peer input path into wcd937x_set_compander().\nAC:L - A single ioctl writing a toggled value to \"HPHL_COMP Switch\" or \"HPHR_COMP Switch\" deterministically drives mc->reg == -1 into the ch_info[] index and the u8 truncation to 255, with no race, timing window, or unpredictable precondition. The out-of-bounds indices and written values derive from fixed module .data content, so they are identical on every boot of a given build.\nPR:L - No capability check exists on the path; the attacker only needs write access to the sound card's control node, which unprivileged desktop/embedded users hold via the audio group or logind ACLs and which the audio HAL holds on Android. Per the higher-severity rule this is Low rather than High.\nUI:N - The attacker performs the control write entirely on its own; no victim must open a file, mount anything, or interact with audio in any way. The codec controls are registered as soon as the WCD937x component probes.\nS:U - The out-of-bounds accesses corrupt kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The path performs multiple unbounded reads — ch_info[-1], ch_info[255] roughly 3 KB past a 96-byte array, and sdw_slave->m_port_map[] indexed by an attacker-unbounded u8 — and the resulting heap out-of-bounds writes constitute memory corruption that can be leveraged for arbitrary read, so High applies.\nI:H - Two out-of-bounds writes occur past the small devm_kzalloc'd wcd937x_sdw_priv object (port_config[port_idx-1].num up to ~2 KB beyond, master_channel_map[mstr_port_num] up to ~1 KB beyond), corrupting adjacent slab objects with build-deterministic offsets — a heap write primitive suitable for control-flow hijacking.\nA:H - Out-of-bounds slab writes corrupt neighbouring allocations and readily produce KASAN reports, slab metadata damage, and kernel oops/panic; the far OOB read may also touch unmapped memory. Any kernel crash is scored High." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "sound/soc/codecs/wcd937x.c" ], "versions": [ { "version": "82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4", "lessThan": "abcd537aae3b84c6d10ad147e99a204bcb56b234", "status": "affected", "versionType": "git" }, { "version": "82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4", "lessThan": "1a1ca38392e7e896075afc8905ddaea525ed30f7", "status": "affected", "versionType": "git" }, { "version": "82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4", "lessThan": "66a940b1bf48a7095162688332d725ba160154eb", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "sound/soc/codecs/wcd937x.c" ], "versions": [ { "version": "6.11", "status": "affected" }, { "version": "0", "lessThan": "6.11", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.53", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.17.3", "lessThanOrEqual": "6.17.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.18", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.11", "versionEndExcluding": "6.12.53" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.11", "versionEndExcluding": "6.17.3" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.11", "versionEndExcluding": "6.18" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/abcd537aae3b84c6d10ad147e99a204bcb56b234" }, { "url": "https://git.kernel.org/stable/c/1a1ca38392e7e896075afc8905ddaea525ed30f7" }, { "url": "https://git.kernel.org/stable/c/66a940b1bf48a7095162688332d725ba160154eb" } ], "title": "ASoC: codecs: wcd937x: set the comp soundwire port correctly", "x_generator": { "engine": "bippy-1.2.0" } } } }