In the Linux kernel, the following vulnerability has been resolved:
cppc_cpufreq: Fix possible null pointer dereference
cppccpufreqgetrate() and hisicppccpufreqgetrate() can be called from different places with various parameters. So cpufreqcpu_get() can return null as 'policy' in some circumstances. Fix this bug by adding null return check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[
{
"id": "CVE-2024-38573-1240672e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cf7de25878a1f4508c69dc9f6819c21ba177dbfe",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "hisi_cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 284.0,
"function_hash": "319519522231860889309043722306556934571"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-2e32b873",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b18daa4ec727c0266de5bfc78e818d168cc4aedf",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "hisi_cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 284.0,
"function_hash": "319519522231860889309043722306556934571"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-342d07bb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b18daa4ec727c0266de5bfc78e818d168cc4aedf",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 425.0,
"function_hash": "219625835929196703726200109894526383745"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-4d8b6cbf",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfec15222529d22b15e5b0d63572a9e39570cab4",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"181326895194507175028612820292817319527",
"93793117057647869388859084737043788605",
"168431388308199405029195854059295713873",
"17718423761152533037520847169181946937",
"139682973053694870489087370033277821355",
"6281654754666320090000993085427523189",
"222568045538281967585767560917164059450",
"235688188322607141859864656535999185711",
"60925684262093336180643428308277520941",
"106413512077399151271908241021229519872",
"270164760350863535986982932458399387324",
"337418624697691520224378166721731993564"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-38573-7a901c8d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b18daa4ec727c0266de5bfc78e818d168cc4aedf",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"181326895194507175028612820292817319527",
"93793117057647869388859084737043788605",
"168431388308199405029195854059295713873",
"17718423761152533037520847169181946937",
"139682973053694870489087370033277821355",
"6281654754666320090000993085427523189",
"222568045538281967585767560917164059450",
"235688188322607141859864656535999185711",
"60925684262093336180643428308277520941",
"106413512077399151271908241021229519872",
"270164760350863535986982932458399387324",
"337418624697691520224378166721731993564"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-38573-86373240",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@769c4f355b7962895205b86ad35617873feef9a5",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 414.0,
"function_hash": "222516969514647896216557036101768083218"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-98fbb61d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9a185cc5a79ba408e1c73375706630662304f618",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 414.0,
"function_hash": "222516969514647896216557036101768083218"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-9aeb61de",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@769c4f355b7962895205b86ad35617873feef9a5",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"181326895194507175028612820292817319527",
"93793117057647869388859084737043788605",
"168431388308199405029195854059295713873",
"17718423761152533037520847169181946937",
"139682973053694870489087370033277821355",
"6281654754666320090000993085427523189",
"222568045538281967585767560917164059450",
"235688188322607141859864656535999185711",
"60925684262093336180643428308277520941",
"106413512077399151271908241021229519872",
"270164760350863535986982932458399387324",
"337418624697691520224378166721731993564"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-38573-b01720f4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f84b9b25d045e67a7eee5e73f21278c8ab06713c",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 410.0,
"function_hash": "11730475769800555909256752171345344200"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-b59f6301",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cf7de25878a1f4508c69dc9f6819c21ba177dbfe",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"181326895194507175028612820292817319527",
"93793117057647869388859084737043788605",
"168431388308199405029195854059295713873",
"17718423761152533037520847169181946937",
"139682973053694870489087370033277821355",
"6281654754666320090000993085427523189",
"222568045538281967585767560917164059450",
"235688188322607141859864656535999185711",
"60925684262093336180643428308277520941",
"106413512077399151271908241021229519872",
"270164760350863535986982932458399387324",
"337418624697691520224378166721731993564"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-38573-bb744f64",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9a185cc5a79ba408e1c73375706630662304f618",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "hisi_cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 269.0,
"function_hash": "153524985898416290770793481094278334490"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-c722e257",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cf7de25878a1f4508c69dc9f6819c21ba177dbfe",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 425.0,
"function_hash": "219625835929196703726200109894526383745"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-cde5d7f3",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9a185cc5a79ba408e1c73375706630662304f618",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"181326895194507175028612820292817319527",
"93793117057647869388859084737043788605",
"168431388308199405029195854059295713873",
"17718423761152533037520847169181946937",
"139682973053694870489087370033277821355",
"6281654754666320090000993085427523189",
"222568045538281967585767560917164059450",
"235688188322607141859864656535999185711",
"60925684262093336180643428308277520941",
"106413512077399151271908241021229519872",
"270164760350863535986982932458399387324",
"337418624697691520224378166721731993564"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2024-38573-cea718e9",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfec15222529d22b15e5b0d63572a9e39570cab4",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 425.0,
"function_hash": "219625835929196703726200109894526383745"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-d9cfd972",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@769c4f355b7962895205b86ad35617873feef9a5",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "hisi_cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 269.0,
"function_hash": "153524985898416290770793481094278334490"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-dc484807",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f84b9b25d045e67a7eee5e73f21278c8ab06713c",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "hisi_cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 269.0,
"function_hash": "153524985898416290770793481094278334490"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-f0020ef5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfec15222529d22b15e5b0d63572a9e39570cab4",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "hisi_cppc_cpufreq_get_rate",
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"length": 284.0,
"function_hash": "319519522231860889309043722306556934571"
},
"signature_type": "Function"
},
{
"id": "CVE-2024-38573-f1c67962",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f84b9b25d045e67a7eee5e73f21278c8ab06713c",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/cpufreq/cppc_cpufreq.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"181326895194507175028612820292817319527",
"93793117057647869388859084737043788605",
"168431388308199405029195854059295713873",
"17718423761152533037520847169181946937",
"139682973053694870489087370033277821355",
"6281654754666320090000993085427523189",
"222568045538281967585767560917164059450",
"235688188322607141859864656535999185711",
"60925684262093336180643428308277520941",
"106413512077399151271908241021229519872",
"270164760350863535986982932458399387324",
"337418624697691520224378166721731993564"
]
},
"signature_type": "Line"
}
]