In the Linux kernel, the following vulnerability has been resolved:
clk: Fix clkcoreget NULL dereference
It is possible for clkcoreget to dereference a NULL in the following sequence:
clkcoreget() ofclkgethwfromclkspec() _ofclkgethwfromprovider() _clkgethw()
_clkgethw() can return NULL which is dereferenced by clkcore_get() at hw->core.
Prior to commit dde4eff47c82 ("clk: Look for parents with clkdev based clklookups") the check ISERRORNULL() was performed which would have caught the NULL.
Reading the description of this function it talks about returning NULL but that cannot be so at the moment.
Update the function to check for hw before dereferencing it and return NULL if hw is NULL.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f073b24a9e2becd25ac4505a9780a87e621bb51",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-04b5c0d7",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8b2b26fdd011ebe36d68a9a321ca45801685959",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-0cf5ac3c",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@239174535dba11f7b83de0eaaa27909024f8c185",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-32e2b5f8",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0efb9ef6fb95384ba631d6819e66f10392aabfa2",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-3b00f02c",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c554badcae9c45b737a22d23454170c6020b90e6",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-464be1bb",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a5d9b1aa61b401867b9066d54086b3e4ee91f8ed",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-5b713d3a",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f073b24a9e2becd25ac4505a9780a87e621bb51",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-68ed6b80",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@239174535dba11f7b83de0eaaa27909024f8c185",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-799e3551",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d7ae7d1265686b55832a445b1db8cdd69738ac07",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-82db4de3",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e97fe4901e0f59a0bfd524578fe3768f8ca42428",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-84922c21",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c554badcae9c45b737a22d23454170c6020b90e6",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-94cd7039",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e97fe4901e0f59a0bfd524578fe3768f8ca42428",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-97193deb",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8b2b26fdd011ebe36d68a9a321ca45801685959",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "clk_core_get",
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-a12bf6b4",
"signature_type": "Function",
"digest": {
"length": 584.0,
"function_hash": "245339657236657278677553340658495071252"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0efb9ef6fb95384ba631d6819e66f10392aabfa2",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-d38a3e7f",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a5d9b1aa61b401867b9066d54086b3e4ee91f8ed",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-d3e42ae4",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d7ae7d1265686b55832a445b1db8cdd69738ac07",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/clk/clk.c"
},
"id": "CVE-2024-27038-f5b68adc",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"281378491935804838320207216098569129853",
"9070961779145079979444021682510156034",
"205984017012142630492008403788215859080"
]
}
}
]