In the Linux kernel, the following vulnerability has been resolved:
clk: imx: clk-imx8mp: improve error handling in imx8mpclocksprobe()
Replace ofiomap() and kzalloc() with devmofiomap() and devmkzalloc() which can automatically release the related memory when the device or driver is removed or unloaded to avoid potential memory leak.
In this case, iounmap(anatop_base) in line 427,433 are removed as manual release is not required.
Besides, referring to clk-imx8mq.c, check the return code of ofclkaddhwprovider, if it returns negtive, print error info and unregister hws, which makes the program more robust.
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"137150125155132444364838147508390527362",
"249115614215196544857456857607637796315",
"2639794605628975167603516593015779888",
"267604503917438312999458058432771322727",
"57760069330593920975778930942013164362",
"42639974170691182416045498922438789502",
"50878886043543596314508525017451844143",
"331082287698754427982212779200742944298",
"109494726240937098233609512477218771132",
"200377373466684112505684750583807574411",
"271777736070372982335271390744073973875",
"39540377268814005464054751887390327580",
"10999354082524620706589447118232206998",
"278754839674311748710693906678959200481",
"191768456169606066503053436149172441458",
"163637856850944419591453073211341508754",
"205272623452390839311666969362120933796",
"179849923144074900813653864855838990558",
"140940723360755188838096975323806150599",
"11646642046138432796283431048475661461",
"196109849613344777293698298184963017632",
"293027051517835591124190516738820600213",
"122867758712131585436618212097025132249",
"161352035560030152427977630687573389643"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@878b02d5f3b56cb090dbe2c70c89273be144087f",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c"
},
"id": "CVE-2023-53704-18c118cc",
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"function_hash": "332825555339310774203105382513825297090",
"length": 26155.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92ce7629a11ae62292e1cfaa6132dab081fc80ee",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c",
"function": "imx8mp_clocks_probe"
},
"id": "CVE-2023-53704-37b501bd",
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"function_hash": "297093363114374329400494866356330169527",
"length": 27240.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb047c13bbf9018693ae31f03a5a26b212d02f13",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c",
"function": "imx8mp_clocks_probe"
},
"id": "CVE-2023-53704-68e4de25",
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"function_hash": "181677187141453422699490349972634042183",
"length": 26028.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bcf140e9e6cf76f1f1bd1f489a14ca4d49f9a1a",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c",
"function": "imx8mp_clocks_probe"
},
"id": "CVE-2023-53704-6c18a6fa",
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"function_hash": "332825555339310774203105382513825297090",
"length": 26155.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@878b02d5f3b56cb090dbe2c70c89273be144087f",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c",
"function": "imx8mp_clocks_probe"
},
"id": "CVE-2023-53704-79501f5c",
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"137150125155132444364838147508390527362",
"249115614215196544857456857607637796315",
"2639794605628975167603516593015779888",
"267604503917438312999458058432771322727",
"57760069330593920975778930942013164362",
"42639974170691182416045498922438789502",
"50878886043543596314508525017451844143",
"331082287698754427982212779200742944298",
"109494726240937098233609512477218771132",
"200377373466684112505684750583807574411",
"271777736070372982335271390744073973875",
"39540377268814005464054751887390327580",
"10999354082524620706589447118232206998",
"278754839674311748710693906678959200481",
"191768456169606066503053436149172441458",
"163637856850944419591453073211341508754",
"205272623452390839311666969362120933796",
"179849923144074900813653864855838990558",
"140940723360755188838096975323806150599",
"11646642046138432796283431048475661461",
"196109849613344777293698298184963017632",
"293027051517835591124190516738820600213",
"122867758712131585436618212097025132249",
"161352035560030152427977630687573389643"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92ce7629a11ae62292e1cfaa6132dab081fc80ee",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c"
},
"id": "CVE-2023-53704-9d0f8e93",
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"137150125155132444364838147508390527362",
"249115614215196544857456857607637796315",
"2639794605628975167603516593015779888",
"267604503917438312999458058432771322727",
"57760069330593920975778930942013164362",
"42639974170691182416045498922438789502",
"50878886043543596314508525017451844143",
"331082287698754427982212779200742944298",
"109494726240937098233609512477218771132",
"200377373466684112505684750583807574411",
"271777736070372982335271390744073973875",
"39540377268814005464054751887390327580",
"10999354082524620706589447118232206998",
"278754839674311748710693906678959200481",
"191768456169606066503053436149172441458",
"163637856850944419591453073211341508754",
"205272623452390839311666969362120933796",
"179849923144074900813653864855838990558",
"140940723360755188838096975323806150599",
"11646642046138432796283431048475661461",
"196109849613344777293698298184963017632",
"330247976771864336522106787195045577836",
"101462064065049026939021325245527402424",
"125060478573513771189899526217643532818"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcea444ab4c045864b55d67313833d606676602a",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c"
},
"id": "CVE-2023-53704-9d6a19e5",
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"51185704841063359324141317786773805189",
"221963484646080565934133588390272112961",
"182215486877386121293962571115923667379",
"267604503917438312999458058432771322727",
"57760069330593920975778930942013164362",
"42639974170691182416045498922438789502",
"50878886043543596314508525017451844143",
"331082287698754427982212779200742944298",
"109494726240937098233609512477218771132",
"200377373466684112505684750583807574411",
"271777736070372982335271390744073973875",
"39540377268814005464054751887390327580",
"10999354082524620706589447118232206998",
"278754839674311748710693906678959200481",
"191768456169606066503053436149172441458",
"163637856850944419591453073211341508754",
"205272623452390839311666969362120933796",
"179849923144074900813653864855838990558",
"140940723360755188838096975323806150599",
"11646642046138432796283431048475661461",
"196109849613344777293698298184963017632",
"330247976771864336522106787195045577836",
"101462064065049026939021325245527402424",
"125060478573513771189899526217643532818"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb047c13bbf9018693ae31f03a5a26b212d02f13",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c"
},
"id": "CVE-2023-53704-b589b37b",
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"function_hash": "57062867124392088318530420051049970739",
"length": 25128.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6317d0302655f7e854cd4f31e93b47d35cb058bb",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c",
"function": "imx8mp_clocks_probe"
},
"id": "CVE-2023-53704-e52a9147",
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"137150125155132444364838147508390527362",
"249115614215196544857456857607637796315",
"2639794605628975167603516593015779888",
"267604503917438312999458058432771322727",
"57760069330593920975778930942013164362",
"42639974170691182416045498922438789502",
"50878886043543596314508525017451844143",
"331082287698754427982212779200742944298",
"109494726240937098233609512477218771132",
"200377373466684112505684750583807574411",
"271777736070372982335271390744073973875",
"39540377268814005464054751887390327580",
"10999354082524620706589447118232206998",
"278754839674311748710693906678959200481",
"191768456169606066503053436149172441458",
"163637856850944419591453073211341508754",
"205272623452390839311666969362120933796",
"179849923144074900813653864855838990558",
"140940723360755188838096975323806150599",
"11646642046138432796283431048475661461",
"196109849613344777293698298184963017632",
"330247976771864336522106787195045577836",
"101462064065049026939021325245527402424",
"125060478573513771189899526217643532818"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6317d0302655f7e854cd4f31e93b47d35cb058bb",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c"
},
"id": "CVE-2023-53704-eff7934a",
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"function_hash": "198522144619792755432760756055537825048",
"length": 25923.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcea444ab4c045864b55d67313833d606676602a",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c",
"function": "imx8mp_clocks_probe"
},
"id": "CVE-2023-53704-f79eba6a",
"signature_type": "Function",
"signature_version": "v1"
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"137150125155132444364838147508390527362",
"249115614215196544857456857607637796315",
"2639794605628975167603516593015779888",
"267604503917438312999458058432771322727",
"57760069330593920975778930942013164362",
"42639974170691182416045498922438789502",
"50878886043543596314508525017451844143",
"331082287698754427982212779200742944298",
"109494726240937098233609512477218771132",
"200377373466684112505684750583807574411",
"271777736070372982335271390744073973875",
"39540377268814005464054751887390327580",
"10999354082524620706589447118232206998",
"278754839674311748710693906678959200481",
"191768456169606066503053436149172441458",
"163637856850944419591453073211341508754",
"205272623452390839311666969362120933796",
"179849923144074900813653864855838990558",
"140940723360755188838096975323806150599",
"11646642046138432796283431048475661461",
"196109849613344777293698298184963017632",
"293027051517835591124190516738820600213",
"122867758712131585436618212097025132249",
"161352035560030152427977630687573389643"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bcf140e9e6cf76f1f1bd1f489a14ca4d49f9a1a",
"target": {
"file": "drivers/clk/imx/clk-imx8mp.c"
},
"id": "CVE-2023-53704-fa1a4650",
"signature_type": "Line",
"signature_version": "v1"
}
]