CVE-2025-40162

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-40162
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40162.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40162
Downstream
Published
2025-11-12T10:26:22Z
Modified
2025-11-12T20:31:37.035899Z
Summary
ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails
Details

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

ASoC: amd/sdwutils: avoid NULL deref when devmkasprintf() fails

devmkasprintf() may return NULL on memory allocation failure, but the debug message prints cpus->dainame before checking it. Move the dev_dbg() call after the NULL check to prevent potential NULL pointer dereference.

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
cb8ea62e6402067ba092d4c1d66a9440513a572b
Fixed
095d692e5997ece300c89f10d903d5230090e6a0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cb8ea62e6402067ba092d4c1d66a9440513a572b
Fixed
a1cccbd19676fc36854535a7118ba2c27d0b84b3
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cb8ea62e6402067ba092d4c1d66a9440513a572b
Fixed
5726b68473f7153a7f6294185e5998b7e2a230a2

Affected versions

v6.*

v6.11
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.10
v6.12.11
v6.12.12
v6.12.13
v6.12.14
v6.12.15
v6.12.16
v6.12.17
v6.12.18
v6.12.19
v6.12.2
v6.12.20
v6.12.21
v6.12.22
v6.12.23
v6.12.24
v6.12.25
v6.12.26
v6.12.27
v6.12.28
v6.12.29
v6.12.3
v6.12.30
v6.12.31
v6.12.32
v6.12.33
v6.12.34
v6.12.35
v6.12.36
v6.12.37
v6.12.38
v6.12.39
v6.12.4
v6.12.40
v6.12.41
v6.12.42
v6.12.43
v6.12.44
v6.12.45
v6.12.46
v6.12.47
v6.12.48
v6.12.49
v6.12.5
v6.12.50
v6.12.51
v6.12.52
v6.12.53
v6.12.54
v6.12.6
v6.12.7
v6.12.8
v6.12.9
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.14
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.17.1
v6.17.2
v6.17.3
v6.17.4
v6.18-rc1

Database specific

vanir_signatures

[
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@095d692e5997ece300c89f10d903d5230090e6a0",
        "signature_type": "Line",
        "target": {
            "file": "sound/soc/amd/acp/acp-sdw-sof-mach.c"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312106972528106420176973802445898982036",
                "239796767938320018002969552743563071614",
                "76496519913286910344396064728683096963",
                "284008546026472026857429644262579480557",
                "219720926469281156708029863875085641875",
                "14598174231719819077510942982168967838"
            ]
        },
        "id": "CVE-2025-40162-02c3f51c"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@095d692e5997ece300c89f10d903d5230090e6a0",
        "signature_type": "Function",
        "target": {
            "function": "create_sdw_dailink",
            "file": "sound/soc/amd/acp/acp-sdw-sof-mach.c"
        },
        "deprecated": false,
        "digest": {
            "length": 3083.0,
            "function_hash": "295716586690491332970055639952581187788"
        },
        "id": "CVE-2025-40162-39ed3e53"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5726b68473f7153a7f6294185e5998b7e2a230a2",
        "signature_type": "Line",
        "target": {
            "file": "sound/soc/amd/acp/acp-sdw-sof-mach.c"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312106972528106420176973802445898982036",
                "239796767938320018002969552743563071614",
                "76496519913286910344396064728683096963",
                "284008546026472026857429644262579480557",
                "219720926469281156708029863875085641875",
                "14598174231719819077510942982168967838"
            ]
        },
        "id": "CVE-2025-40162-7a330570"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5726b68473f7153a7f6294185e5998b7e2a230a2",
        "signature_type": "Function",
        "target": {
            "function": "create_sdw_dailink",
            "file": "sound/soc/amd/acp/acp-sdw-sof-mach.c"
        },
        "deprecated": false,
        "digest": {
            "length": 3261.0,
            "function_hash": "112675881893032381398056605681523941395"
        },
        "id": "CVE-2025-40162-8771f446"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1cccbd19676fc36854535a7118ba2c27d0b84b3",
        "signature_type": "Function",
        "target": {
            "function": "create_sdw_dailink",
            "file": "sound/soc/amd/acp/acp-sdw-sof-mach.c"
        },
        "deprecated": false,
        "digest": {
            "length": 3261.0,
            "function_hash": "112675881893032381398056605681523941395"
        },
        "id": "CVE-2025-40162-cca0b26f"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1cccbd19676fc36854535a7118ba2c27d0b84b3",
        "signature_type": "Line",
        "target": {
            "file": "sound/soc/amd/acp/acp-sdw-sof-mach.c"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312106972528106420176973802445898982036",
                "239796767938320018002969552743563071614",
                "76496519913286910344396064728683096963",
                "284008546026472026857429644262579480557",
                "219720926469281156708029863875085641875",
                "14598174231719819077510942982168967838"
            ]
        },
        "id": "CVE-2025-40162-d06b25c2"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.55
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.5