CVE-2025-21870

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-21870
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21870.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-21870
Downstream
Related
Published
2025-03-27T13:38:22.849Z
Modified
2025-11-20T08:23:26.451449Z
Summary
ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers
Details

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

ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers

Other, non DAI copier widgets could have the same stream name (sname) as the ALH copier and in that case the copier->data is NULL, no alhdata is attached, which could lead to NULL pointer dereference. We could check for this NULL pointer in sofipc4preparecopiermodule() and avoid the crash, but a similar loop in sofipc4widgetsetupcompdai() will miscalculate the ALH device count, causing broken audio.

The correct fix is to harden the matching logic by making sure that the 1. widget is a DAI widget - so dai = w->private is valid 2. the dai (and thus the copier) is ALH copier

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a150345aa758492e05d2934f318ce7c2566b1cfe
Fixed
87c8768a96092ce75cd47fe076db5080db7ac515
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a150345aa758492e05d2934f318ce7c2566b1cfe
Fixed
93c6c2e5801aab09ef1ef99f248f3cd323c3f152
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a150345aa758492e05d2934f318ce7c2566b1cfe
Fixed
6fd60136d256b3b948333ebdb3835f41a95ab7ef

Affected versions

v5.*

v5.19
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.1
v6.1-rc1
v6.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
v6.9-rc6
v6.9-rc7

Database specific

vanir_signatures

[
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 3084.0,
            "function_hash": "115076915775455276163687502976246767387"
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87c8768a96092ce75cd47fe076db5080db7ac515",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c",
            "function": "sof_ipc4_widget_setup_comp_dai"
        },
        "id": "CVE-2025-21870-18cbee21"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 7264.0,
            "function_hash": "127552442688055662672609317173948693747"
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@93c6c2e5801aab09ef1ef99f248f3cd323c3f152",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c",
            "function": "sof_ipc4_prepare_copier_module"
        },
        "id": "CVE-2025-21870-20af5b6f"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 3074.0,
            "function_hash": "331938341934255077007147443416538335841"
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fd60136d256b3b948333ebdb3835f41a95ab7ef",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c",
            "function": "sof_ipc4_widget_setup_comp_dai"
        },
        "id": "CVE-2025-21870-2278b70a"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 3074.0,
            "function_hash": "331938341934255077007147443416538335841"
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@93c6c2e5801aab09ef1ef99f248f3cd323c3f152",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c",
            "function": "sof_ipc4_widget_setup_comp_dai"
        },
        "id": "CVE-2025-21870-29c84ce7"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "288681470394676775474125222039068243045",
                "270012802351597690393557217221949720351",
                "217384432190477854620331545279492470544",
                "87184321897154613454382126071442128105",
                "129096024655215825871337576216637757416",
                "241703922269031380824025328190695475140",
                "236625986055588894849944952304508635265",
                "245285358781856066731375714659421559031",
                "86308231574354931360881574530149612554",
                "96112410694297461369881985549518747771",
                "39690732643588960044166337213991104755",
                "54671803068893921730379095013420335291",
                "40909832622757656948671230591910316636"
            ],
            "threshold": 0.9
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87c8768a96092ce75cd47fe076db5080db7ac515",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c"
        },
        "id": "CVE-2025-21870-5a92244d"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 7264.0,
            "function_hash": "127552442688055662672609317173948693747"
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fd60136d256b3b948333ebdb3835f41a95ab7ef",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c",
            "function": "sof_ipc4_prepare_copier_module"
        },
        "id": "CVE-2025-21870-c3654fec"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "288681470394676775474125222039068243045",
                "270012802351597690393557217221949720351",
                "217384432190477854620331545279492470544",
                "87184321897154613454382126071442128105",
                "129096024655215825871337576216637757416",
                "241703922269031380824025328190695475140",
                "236625986055588894849944952304508635265",
                "245285358781856066731375714659421559031",
                "86308231574354931360881574530149612554",
                "96112410694297461369881985549518747771",
                "39690732643588960044166337213991104755",
                "54671803068893921730379095013420335291",
                "40909832622757656948671230591910316636"
            ],
            "threshold": 0.9
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fd60136d256b3b948333ebdb3835f41a95ab7ef",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c"
        },
        "id": "CVE-2025-21870-cc9c318d"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "digest": {
            "length": 7589.0,
            "function_hash": "139722989669898067123439698892744288761"
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87c8768a96092ce75cd47fe076db5080db7ac515",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c",
            "function": "sof_ipc4_prepare_copier_module"
        },
        "id": "CVE-2025-21870-d49a6ccc"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "288681470394676775474125222039068243045",
                "270012802351597690393557217221949720351",
                "217384432190477854620331545279492470544",
                "87184321897154613454382126071442128105",
                "129096024655215825871337576216637757416",
                "241703922269031380824025328190695475140",
                "236625986055588894849944952304508635265",
                "245285358781856066731375714659421559031",
                "86308231574354931360881574530149612554",
                "96112410694297461369881985549518747771",
                "39690732643588960044166337213991104755",
                "54671803068893921730379095013420335291",
                "40909832622757656948671230591910316636"
            ],
            "threshold": 0.9
        },
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@93c6c2e5801aab09ef1ef99f248f3cd323c3f152",
        "target": {
            "file": "sound/soc/sof/ipc4-topology.c"
        },
        "id": "CVE-2025-21870-ffea46ca"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.0.0
Fixed
6.12.17
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.5