In the Linux kernel, the following vulnerability has been resolved:
ALSA: hda: Fix missing pointer check in hdacomponentmanager_init function
The _componentmatchadd function may assign the 'matchptr' pointer the value ERRPTR(-ENOMEM), which will subsequently be dereferenced.
The call stack leading to the error looks like this:
hdacomponentmanagerinit |-> componentmatchadd |-> componentmatchaddrelease |-> _componentmatchadd ( ... ,**matchptr, ... ) |-> *matchptr = ERRPTR(-ENOMEM); // assign |-> componentmasteraddwithmatch( ... match) |-> componentmatchrealloc(match, match->num); // dereference
Add IS_ERR() check to prevent the crash.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@47d1b9ca923b55c3f407788f1f15b04957e0e027",
"target": {
"file": "sound/hda/codecs/side-codecs/hda_component.c"
},
"deprecated": false,
"id": "CVE-2025-40097-0a1e1c6b",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"167488068471323242805669051465009959834",
"259790707703024672211236927621320654438",
"93613294606850328055983426153091711658",
"289232494601287234776829703261789888184"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@47d1b9ca923b55c3f407788f1f15b04957e0e027",
"target": {
"function": "hda_component_manager_init",
"file": "sound/hda/codecs/side-codecs/hda_component.c"
},
"deprecated": false,
"id": "CVE-2025-40097-7bcd4a14",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 863.0,
"function_hash": "67451014674548037285915478145192458254"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1cf11d80db5df805b538c942269e05a65bcaf5bc",
"target": {
"function": "hda_component_manager_init",
"file": "sound/hda/codecs/side-codecs/hda_component.c"
},
"deprecated": false,
"id": "CVE-2025-40097-abe984e1",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 863.0,
"function_hash": "67451014674548037285915478145192458254"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1cf11d80db5df805b538c942269e05a65bcaf5bc",
"target": {
"file": "sound/hda/codecs/side-codecs/hda_component.c"
},
"deprecated": false,
"id": "CVE-2025-40097-ecfc87d1",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"167488068471323242805669051465009959834",
"259790707703024672211236927621320654438",
"93613294606850328055983426153091711658",
"289232494601287234776829703261789888184"
]
}
}
]