In the Linux kernel, the following vulnerability has been resolved:
clk: zynq: Prevent null pointer dereference caused by kmalloc failure
The kmalloc() in zynqclksetup() will return null if the physical memory has run out. As a result, if we use snprintf() to write data to the null address, the null pointer dereference bug will happen.
This patch uses a stack variable to replace the kmalloc().
[
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c"
},
"digest": {
"line_hashes": [
"322424813015408535146219202827123413456",
"41494920204381912773034538796966607706",
"76530464175120759296751887542813055359",
"178446885719257136230457064195972867200",
"306227010713397184127951413016328744377",
"158168693572772538885760915158495073951",
"302098237577965895761516592598617389162",
"70456736573108002326536898703127740306",
"58818876019430084200732804715531815143",
"11390124471241266773516245697057309358",
"35117268305320699475332719958711471304",
"103758732915049406281903736234032122010",
"231691087208851142013359657154462170210",
"93443738296155864973807619767550976415",
"10477414374018152602276358530482924314",
"42285377731362962830890049649869324885",
"162793126362992207600805218764926287518",
"77094144756732508257127046669378335718",
"250997573609196857247223767773927883930"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c4889a9ea861d7be37463c10846eb75e1b49c9d",
"signature_version": "v1",
"id": "CVE-2024-27037-06146e99"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c"
},
"digest": {
"line_hashes": [
"322424813015408535146219202827123413456",
"41494920204381912773034538796966607706",
"76530464175120759296751887542813055359",
"178446885719257136230457064195972867200",
"306227010713397184127951413016328744377",
"158168693572772538885760915158495073951",
"302098237577965895761516592598617389162",
"70456736573108002326536898703127740306",
"58818876019430084200732804715531815143",
"11390124471241266773516245697057309358",
"35117268305320699475332719958711471304",
"103758732915049406281903736234032122010",
"231691087208851142013359657154462170210",
"93443738296155864973807619767550976415",
"10477414374018152602276358530482924314",
"42285377731362962830890049649869324885",
"162793126362992207600805218764926287518",
"77094144756732508257127046669378335718",
"250997573609196857247223767773927883930"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@01511ac7be8e45f80e637f6bf61af2d3d2dee9db",
"signature_version": "v1",
"id": "CVE-2024-27037-25ad95df"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c",
"function": "zynq_clk_setup"
},
"digest": {
"length": 12429.0,
"function_hash": "197127053653141349938229630983145719993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0801c893fd48cdba66a3c8f44c3fe43cc67d3b85",
"signature_version": "v1",
"id": "CVE-2024-27037-3102a69e"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c"
},
"digest": {
"line_hashes": [
"322424813015408535146219202827123413456",
"41494920204381912773034538796966607706",
"76530464175120759296751887542813055359",
"178446885719257136230457064195972867200",
"306227010713397184127951413016328744377",
"158168693572772538885760915158495073951",
"302098237577965895761516592598617389162",
"70456736573108002326536898703127740306",
"58818876019430084200732804715531815143",
"11390124471241266773516245697057309358",
"35117268305320699475332719958711471304",
"103758732915049406281903736234032122010",
"231691087208851142013359657154462170210",
"93443738296155864973807619767550976415",
"10477414374018152602276358530482924314",
"42285377731362962830890049649869324885",
"162793126362992207600805218764926287518",
"77094144756732508257127046669378335718",
"250997573609196857247223767773927883930"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58a946ab43501f2eba058d24d96af0ad1122475b",
"signature_version": "v1",
"id": "CVE-2024-27037-3798c5f4"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c"
},
"digest": {
"line_hashes": [
"322424813015408535146219202827123413456",
"41494920204381912773034538796966607706",
"76530464175120759296751887542813055359",
"178446885719257136230457064195972867200",
"306227010713397184127951413016328744377",
"158168693572772538885760915158495073951",
"302098237577965895761516592598617389162",
"70456736573108002326536898703127740306",
"58818876019430084200732804715531815143",
"11390124471241266773516245697057309358",
"35117268305320699475332719958711471304",
"103758732915049406281903736234032122010",
"231691087208851142013359657154462170210",
"93443738296155864973807619767550976415",
"10477414374018152602276358530482924314",
"42285377731362962830890049649869324885",
"162793126362992207600805218764926287518",
"77094144756732508257127046669378335718",
"250997573609196857247223767773927883930"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca976c6a592f789700200069ef9052493c0b73d8",
"signature_version": "v1",
"id": "CVE-2024-27037-79777874"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c",
"function": "zynq_clk_setup"
},
"digest": {
"length": 12429.0,
"function_hash": "197127053653141349938229630983145719993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58a946ab43501f2eba058d24d96af0ad1122475b",
"signature_version": "v1",
"id": "CVE-2024-27037-84d7e699"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c"
},
"digest": {
"line_hashes": [
"322424813015408535146219202827123413456",
"41494920204381912773034538796966607706",
"76530464175120759296751887542813055359",
"178446885719257136230457064195972867200",
"306227010713397184127951413016328744377",
"158168693572772538885760915158495073951",
"302098237577965895761516592598617389162",
"70456736573108002326536898703127740306",
"58818876019430084200732804715531815143",
"11390124471241266773516245697057309358",
"35117268305320699475332719958711471304",
"103758732915049406281903736234032122010",
"231691087208851142013359657154462170210",
"93443738296155864973807619767550976415",
"10477414374018152602276358530482924314",
"42285377731362962830890049649869324885",
"162793126362992207600805218764926287518",
"77094144756732508257127046669378335718",
"250997573609196857247223767773927883930"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0801c893fd48cdba66a3c8f44c3fe43cc67d3b85",
"signature_version": "v1",
"id": "CVE-2024-27037-88c5f780"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c",
"function": "zynq_clk_setup"
},
"digest": {
"length": 12411.0,
"function_hash": "326621189642152293322032055654601673817"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@01511ac7be8e45f80e637f6bf61af2d3d2dee9db",
"signature_version": "v1",
"id": "CVE-2024-27037-ad679f4b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c",
"function": "zynq_clk_setup"
},
"digest": {
"length": 12429.0,
"function_hash": "197127053653141349938229630983145719993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c4889a9ea861d7be37463c10846eb75e1b49c9d",
"signature_version": "v1",
"id": "CVE-2024-27037-de2e1b36"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/clk/zynq/clkc.c",
"function": "zynq_clk_setup"
},
"digest": {
"length": 12429.0,
"function_hash": "197127053653141349938229630983145719993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca976c6a592f789700200069ef9052493c0b73d8",
"signature_version": "v1",
"id": "CVE-2024-27037-debf9741"
}
]