CVE-2025-40045 (GCVE-0-2025-40045)
Vulnerability from cvelistv5
Published
2025-10-28 11:48
Modified
2026-08-05 12:07
Summary
In the Linux kernel, the following vulnerability has been resolved: ASoC: codecs: wcd937x: set the comp soundwire port correctly For some reason we endup with setting soundwire port for HPHL_COMP and HPHR_COMP as zero, this can potentially result in a memory corruption due to accessing and setting -1 th element of port_map array.
Impacted products
Vendor Product Version
Linux Linux Version: 82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4
Version: 82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4
Version: 82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "sound/soc/codecs/wcd937x.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "abcd537aae3b84c6d10ad147e99a204bcb56b234",
              "status": "affected",
              "version": "82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4",
              "versionType": "git"
            },
            {
              "lessThan": "1a1ca38392e7e896075afc8905ddaea525ed30f7",
              "status": "affected",
              "version": "82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4",
              "versionType": "git"
            },
            {
              "lessThan": "66a940b1bf48a7095162688332d725ba160154eb",
              "status": "affected",
              "version": "82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "sound/soc/codecs/wcd937x.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.11"
            },
            {
              "lessThan": "6.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.53",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.53",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.3",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "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-\u003ereg == -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\u0027s 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 \u2014 ch_info[-1], ch_info[255] roughly 3 KB past a 96-byte array, and sdw_slave-\u003em_port_map[] indexed by an attacker-unbounded u8 \u2014 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\u0027d 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 \u2014 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."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:07:18.382Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40045",
    "datePublished": "2025-10-28T11:48:23.431Z",
    "dateReserved": "2025-04-16T07:20:57.154Z",
    "dateUpdated": "2026-08-05T12:07:18.382Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…