In the Linux kernel, the following vulnerability has been resolved:
powercap: arm_scmi: Remove recursion while parsing zones
Powercap zones can be defined as arranged in a hierarchy of trees and when registering a zone with powercapregisterzone(), the kernel powercap subsystem expects this to happen starting from the root zones down to the leaves; on the other side, de-registration by powercapderegisterzone() must begin from the leaf zones.
Available SCMI powercap zones are retrieved dynamically from the platform at probe time and, while any defined hierarchy between the zones is described properly in the zones descriptor, the platform returns the availables zones with no particular well-defined order: as a consequence, the trees possibly composing the hierarchy of zones have to be somehow walked properly to register the retrieved zones from the root.
Currently the ARM SCMI Powercap driver walks the zones using a recursive algorithm; this approach, even though correct and tested can lead to kernel stack overflow when processing a returned hierarchy of zones composed by particularly high trees.
Avoid possible kernel stack overflow by substituting the recursive approach with an iterative one supported by a dynamically allocated stack-like data structure.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8022b64fb7daa6135d9f7b0e2f7b5b8e9e5179c9",
"id": "CVE-2023-53428-1a7a496a",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"264919616842345094216057440954479910903",
"233701816616158457485124045028053290229",
"24451853572334773503490152191358148187",
"23966906716464482327594401604039130815",
"35150400259923834129377264699963785153",
"38637435376604202688957510143567914745",
"290453497008838310314029712497909709826",
"156895790051321977264323070729552008504",
"313017256508015657475468251935325530097",
"106306025900317821629929447881735054965",
"100296916673557759389737726384716309652",
"16315971693626906158354724541616717158",
"149404655981125487234478554860175089570",
"132095540678121002750071456105770085858",
"147488890026586677038699816058583368115",
"58950406746716199311048507327438951937",
"41320406905592919141795248815000756246",
"193088768821770559735803411961658845952",
"132474973332038013242272914615134073276",
"248405741892478784392248511823051770991",
"200593988656484599955800060863484601644",
"131655807458620111621496028138656376781",
"98617808667524069484937483288087032174",
"207938805844325473169284729850867508692",
"122016896117167784809479002248621250479",
"329920406922146745929695995976439440843",
"174743269268063337867980025424583557552",
"278778806515433355759229037899352725427",
"24779256203313497136740255407031929016",
"170753949501807440043932660817426065893",
"13627351997560855965947114985313842756",
"49816069259450927419524454544141827919",
"80114829224315133651514174196058569266",
"127541580215542266015842075698072730732",
"212296147660695519490553483845163925593",
"135053723240973447652371790062958062040",
"320934494027180129593398647005623251115",
"338850480363049276776800980869899874812",
"295664707059852629777006324120558048890",
"118104779009222265768028689763720464147",
"273695700919840897331922963081266355290",
"74146238504357336430423232975687221448",
"8972343132743118776757837202018511651",
"117393781251718915416038780660975124813",
"136289464221925313049285644027987112440",
"138538556688510181193673056828262419108",
"124577437152825856269743792988937966918",
"115327279442794879116249261074975960783",
"57857029288738867556434750961217056689",
"4661371812943516534785480674699464188",
"4173944959386440558807794965537533811",
"201426436770459502046027695458124954243",
"250141787155361831126508365387245526683",
"118051290022791788395058584137839156397",
"210030449123794060634433163344401448276",
"273189482449896571110554737270802739221",
"188714434827240683457808743073871769168",
"2387056452843815666377980053931588431",
"270591113062015962622308757923408123102",
"249938518771520639246949321654115510571",
"59134768949862237124389823679524649315",
"201541717412904143452260414197344225132",
"31218143252410744189682548658832289808",
"149097401679836104741610617787757126687",
"84131958262053287935429751555932602760",
"275381470547934753114279933317532702100",
"229360835441765331595991451293732935672",
"185986697071050986059150079090986360685",
"85331059870758705772171565177456851576",
"308759699071577498258254445096382965315",
"165102202218626387576231518308739309430",
"242425872422674801625564938574952137216",
"247867989025708763165461878603488661272",
"330302920324874179707456134459598841552",
"292987354160231246602933134699973069756",
"159708872338621124423919667584092209145",
"76772468398125357878647178381159524447",
"157967474259151791298284875754616244881",
"130095728262939663042741087423291777591",
"307726906048500016194711035528445558674",
"141301610184725774289625922992836122032",
"41136030835007870469182181475864761365",
"213414377123249392407718568850208198164",
"212540336784525334159744332083305337539",
"46320019346740121138353200428200101870",
"12386737926506991271531929397737470549",
"73965788994472876458033170413163661891",
"281423752229094309692906578496586308008"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b427c23cebc5c926516f20304bf1acc05a33d147",
"id": "CVE-2023-53428-3b92f332",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_probe",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 1785.0,
"function_hash": "275345402334995367562810918620839138512"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8022b64fb7daa6135d9f7b0e2f7b5b8e9e5179c9",
"id": "CVE-2023-53428-44482daf",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_probe",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 1785.0,
"function_hash": "275345402334995367562810918620839138512"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e767d6850f867cc33ac16ca097350a1d2417982",
"id": "CVE-2023-53428-51052cb0",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_is_zone_registered",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 90.0,
"function_hash": "285894795507680705384906026840889959893"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8022b64fb7daa6135d9f7b0e2f7b5b8e9e5179c9",
"id": "CVE-2023-53428-5c802767",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_is_zone_registered",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 90.0,
"function_hash": "285894795507680705384906026840889959893"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e767d6850f867cc33ac16ca097350a1d2417982",
"id": "CVE-2023-53428-62d80b8b",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"264919616842345094216057440954479910903",
"233701816616158457485124045028053290229",
"24451853572334773503490152191358148187",
"23966906716464482327594401604039130815",
"35150400259923834129377264699963785153",
"38637435376604202688957510143567914745",
"290453497008838310314029712497909709826",
"156895790051321977264323070729552008504",
"313017256508015657475468251935325530097",
"106306025900317821629929447881735054965",
"100296916673557759389737726384716309652",
"16315971693626906158354724541616717158",
"149404655981125487234478554860175089570",
"132095540678121002750071456105770085858",
"147488890026586677038699816058583368115",
"58950406746716199311048507327438951937",
"41320406905592919141795248815000756246",
"193088768821770559735803411961658845952",
"132474973332038013242272914615134073276",
"248405741892478784392248511823051770991",
"200593988656484599955800060863484601644",
"131655807458620111621496028138656376781",
"98617808667524069484937483288087032174",
"207938805844325473169284729850867508692",
"122016896117167784809479002248621250479",
"329920406922146745929695995976439440843",
"174743269268063337867980025424583557552",
"278778806515433355759229037899352725427",
"24779256203313497136740255407031929016",
"170753949501807440043932660817426065893",
"13627351997560855965947114985313842756",
"49816069259450927419524454544141827919",
"80114829224315133651514174196058569266",
"127541580215542266015842075698072730732",
"212296147660695519490553483845163925593",
"135053723240973447652371790062958062040",
"320934494027180129593398647005623251115",
"338850480363049276776800980869899874812",
"295664707059852629777006324120558048890",
"118104779009222265768028689763720464147",
"273695700919840897331922963081266355290",
"74146238504357336430423232975687221448",
"8972343132743118776757837202018511651",
"117393781251718915416038780660975124813",
"136289464221925313049285644027987112440",
"138538556688510181193673056828262419108",
"124577437152825856269743792988937966918",
"115327279442794879116249261074975960783",
"57857029288738867556434750961217056689",
"4661371812943516534785480674699464188",
"4173944959386440558807794965537533811",
"201426436770459502046027695458124954243",
"250141787155361831126508365387245526683",
"118051290022791788395058584137839156397",
"210030449123794060634433163344401448276",
"273189482449896571110554737270802739221",
"188714434827240683457808743073871769168",
"2387056452843815666377980053931588431",
"270591113062015962622308757923408123102",
"249938518771520639246949321654115510571",
"59134768949862237124389823679524649315",
"201541717412904143452260414197344225132",
"31218143252410744189682548658832289808",
"149097401679836104741610617787757126687",
"84131958262053287935429751555932602760",
"275381470547934753114279933317532702100",
"229360835441765331595991451293732935672",
"185986697071050986059150079090986360685",
"85331059870758705772171565177456851576",
"308759699071577498258254445096382965315",
"165102202218626387576231518308739309430",
"242425872422674801625564938574952137216",
"247867989025708763165461878603488661272",
"330302920324874179707456134459598841552",
"292987354160231246602933134699973069756",
"159708872338621124423919667584092209145",
"76772468398125357878647178381159524447",
"157967474259151791298284875754616244881",
"130095728262939663042741087423291777591",
"307726906048500016194711035528445558674",
"141301610184725774289625922992836122032",
"41136030835007870469182181475864761365",
"213414377123249392407718568850208198164",
"212540336784525334159744332083305337539",
"46320019346740121138353200428200101870",
"12386737926506991271531929397737470549",
"73965788994472876458033170413163661891",
"281423752229094309692906578496586308008"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8022b64fb7daa6135d9f7b0e2f7b5b8e9e5179c9",
"id": "CVE-2023-53428-666e49a8",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_register_zone",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 1011.0,
"function_hash": "128858328360922207428197788822431829757"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b427c23cebc5c926516f20304bf1acc05a33d147",
"id": "CVE-2023-53428-6e05d99d",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_register_zone",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 1011.0,
"function_hash": "128858328360922207428197788822431829757"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b427c23cebc5c926516f20304bf1acc05a33d147",
"id": "CVE-2023-53428-7e82119f",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_is_zone_registered",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 90.0,
"function_hash": "285894795507680705384906026840889959893"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e767d6850f867cc33ac16ca097350a1d2417982",
"id": "CVE-2023-53428-8e5f2cf7",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_register_zone",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 1011.0,
"function_hash": "128858328360922207428197788822431829757"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b427c23cebc5c926516f20304bf1acc05a33d147",
"id": "CVE-2023-53428-c9e02dcf",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"264919616842345094216057440954479910903",
"233701816616158457485124045028053290229",
"24451853572334773503490152191358148187",
"23966906716464482327594401604039130815",
"35150400259923834129377264699963785153",
"38637435376604202688957510143567914745",
"290453497008838310314029712497909709826",
"156895790051321977264323070729552008504",
"313017256508015657475468251935325530097",
"106306025900317821629929447881735054965",
"100296916673557759389737726384716309652",
"16315971693626906158354724541616717158",
"149404655981125487234478554860175089570",
"132095540678121002750071456105770085858",
"147488890026586677038699816058583368115",
"58950406746716199311048507327438951937",
"41320406905592919141795248815000756246",
"193088768821770559735803411961658845952",
"132474973332038013242272914615134073276",
"248405741892478784392248511823051770991",
"200593988656484599955800060863484601644",
"131655807458620111621496028138656376781",
"98617808667524069484937483288087032174",
"207938805844325473169284729850867508692",
"122016896117167784809479002248621250479",
"329920406922146745929695995976439440843",
"174743269268063337867980025424583557552",
"278778806515433355759229037899352725427",
"24779256203313497136740255407031929016",
"170753949501807440043932660817426065893",
"13627351997560855965947114985313842756",
"49816069259450927419524454544141827919",
"80114829224315133651514174196058569266",
"127541580215542266015842075698072730732",
"212296147660695519490553483845163925593",
"135053723240973447652371790062958062040",
"320934494027180129593398647005623251115",
"338850480363049276776800980869899874812",
"295664707059852629777006324120558048890",
"118104779009222265768028689763720464147",
"273695700919840897331922963081266355290",
"74146238504357336430423232975687221448",
"8972343132743118776757837202018511651",
"117393781251718915416038780660975124813",
"136289464221925313049285644027987112440",
"138538556688510181193673056828262419108",
"124577437152825856269743792988937966918",
"115327279442794879116249261074975960783",
"57857029288738867556434750961217056689",
"4661371812943516534785480674699464188",
"4173944959386440558807794965537533811",
"201426436770459502046027695458124954243",
"250141787155361831126508365387245526683",
"118051290022791788395058584137839156397",
"210030449123794060634433163344401448276",
"273189482449896571110554737270802739221",
"188714434827240683457808743073871769168",
"2387056452843815666377980053931588431",
"270591113062015962622308757923408123102",
"249938518771520639246949321654115510571",
"59134768949862237124389823679524649315",
"201541717412904143452260414197344225132",
"31218143252410744189682548658832289808",
"149097401679836104741610617787757126687",
"84131958262053287935429751555932602760",
"275381470547934753114279933317532702100",
"229360835441765331595991451293732935672",
"185986697071050986059150079090986360685",
"85331059870758705772171565177456851576",
"308759699071577498258254445096382965315",
"165102202218626387576231518308739309430",
"242425872422674801625564938574952137216",
"247867989025708763165461878603488661272",
"330302920324874179707456134459598841552",
"292987354160231246602933134699973069756",
"159708872338621124423919667584092209145",
"76772468398125357878647178381159524447",
"157967474259151791298284875754616244881",
"130095728262939663042741087423291777591",
"307726906048500016194711035528445558674",
"141301610184725774289625922992836122032",
"41136030835007870469182181475864761365",
"213414377123249392407718568850208198164",
"212540336784525334159744332083305337539",
"46320019346740121138353200428200101870",
"12386737926506991271531929397737470549",
"73965788994472876458033170413163661891",
"281423752229094309692906578496586308008"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e767d6850f867cc33ac16ca097350a1d2417982",
"id": "CVE-2023-53428-eb197b00",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "scmi_powercap_probe",
"file": "drivers/powercap/arm_scmi_powercap.c"
},
"digest": {
"length": 1785.0,
"function_hash": "275345402334995367562810918620839138512"
},
"signature_type": "Function"
}
]