In the Linux kernel, the following vulnerability has been resolved:
mtd: parsers: qcom: Fix kernel panic on skipped partition
In the event of a skipped partition (case when the entry name is empty) the kernel panics in the cleanup function as the name entry is NULL. Rework the parser logic by first checking the real partition number and then allocate the space and set the data for the valid partitions.
The logic was also fundamentally wrong as with a skipped partition, the parts number returned was incorrect by not decreasing it for the skipped partitions.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2995fe23095ceda2dc382fbe057f5e164595548",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/mtd/parsers/qcomsmempart.c"
},
"id": "CVE-2022-48777-02ca9d66",
"digest": {
"threshold": 0.9,
"line_hashes": [
"205880675273697176479389967800088156718",
"123525495949648859486570975778951868342",
"158980415662080288244905836623776586937",
"228082674664819051834712470767306060510",
"163891570923540372033739970849751281360",
"280180541864836309483948893166769599247",
"225171057434748129916011067434772822342",
"282812696921680581717150873191364783843",
"167059510846700265929281984210730720444",
"180594791277559243125164125903281889528",
"41832689314896488924089279725947656189",
"328739811428252458954886671302698316509",
"292949031354189120825282386555320434978",
"179764488451699422929830245645753264233",
"114858324894534021883494834290164412977",
"272444774518854675319856302925522937199",
"304969145788025292712645081382834762265",
"55475033319677080079028232284942777925",
"93108709857922557778934996415234657862",
"238409506178954703985571249492380193363",
"334489763760881161578011440515903067424",
"313078379247674934940563151226454943936",
"173982965929399846948233338510084149403",
"74749937967981944356734078024427311859",
"261611775575721783112386679651079016702",
"240875612841562075602743918415278049603",
"153507780003022223298345917597275906664",
"139281515781463497720913603012719684948",
"126423126618065682561068432605840427334",
"261972163381237158663412179938533523172",
"325634113847445301865108294493504514213",
"62383921793977080340360698376144406652",
"49481043399858473213008775178398368962",
"167016605452438641056639736304458821125",
"296560896529934964586560935792225208131",
"217396222089277436118865647145851696963",
"32185873764172523368496552023661691344",
"194821065541921394071541019563211725947",
"173580955536433138181737559856154575877"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65d003cca335cabc0160d3cd7daa689eaa9dd3cd",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "parse_qcomsmem_part",
"file": "drivers/mtd/parsers/qcomsmempart.c"
},
"id": "CVE-2022-48777-3ad54b88",
"digest": {
"length": 2606.0,
"function_hash": "18482025612399869286488358547371607148"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eb03cb6e03ffd9173e18e5fe87e4e3ce83820453",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "parse_qcomsmem_part",
"file": "drivers/mtd/parsers/qcomsmempart.c"
},
"id": "CVE-2022-48777-64379148",
"digest": {
"length": 2564.0,
"function_hash": "21964576472348037738915979055383430187"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eb03cb6e03ffd9173e18e5fe87e4e3ce83820453",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/mtd/parsers/qcomsmempart.c"
},
"id": "CVE-2022-48777-7870610a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"205880675273697176479389967800088156718",
"123525495949648859486570975778951868342",
"158980415662080288244905836623776586937",
"228082674664819051834712470767306060510",
"163891570923540372033739970849751281360",
"280180541864836309483948893166769599247",
"225171057434748129916011067434772822342",
"282812696921680581717150873191364783843",
"167059510846700265929281984210730720444",
"180594791277559243125164125903281889528",
"41832689314896488924089279725947656189",
"328739811428252458954886671302698316509",
"292949031354189120825282386555320434978",
"179764488451699422929830245645753264233",
"114858324894534021883494834290164412977",
"272444774518854675319856302925522937199",
"304969145788025292712645081382834762265",
"55475033319677080079028232284942777925",
"93108709857922557778934996415234657862",
"238409506178954703985571249492380193363",
"334489763760881161578011440515903067424",
"313078379247674934940563151226454943936",
"173982965929399846948233338510084149403",
"74749937967981944356734078024427311859",
"261611775575721783112386679651079016702",
"240875612841562075602743918415278049603",
"153507780003022223298345917597275906664",
"139281515781463497720913603012719684948",
"126423126618065682561068432605840427334",
"261972163381237158663412179938533523172",
"325634113847445301865108294493504514213",
"62383921793977080340360698376144406652",
"49481043399858473213008775178398368962",
"167016605452438641056639736304458821125",
"296560896529934964586560935792225208131",
"217396222089277436118865647145851696963",
"32185873764172523368496552023661691344",
"194821065541921394071541019563211725947",
"173580955536433138181737559856154575877"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@65d003cca335cabc0160d3cd7daa689eaa9dd3cd",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/mtd/parsers/qcomsmempart.c"
},
"id": "CVE-2022-48777-ac283690",
"digest": {
"threshold": 0.9,
"line_hashes": [
"205880675273697176479389967800088156718",
"123525495949648859486570975778951868342",
"158980415662080288244905836623776586937",
"228082674664819051834712470767306060510",
"163891570923540372033739970849751281360",
"280180541864836309483948893166769599247",
"225171057434748129916011067434772822342",
"282812696921680581717150873191364783843",
"167059510846700265929281984210730720444",
"180594791277559243125164125903281889528",
"41832689314896488924089279725947656189",
"328739811428252458954886671302698316509",
"292949031354189120825282386555320434978",
"179764488451699422929830245645753264233",
"114858324894534021883494834290164412977",
"272444774518854675319856302925522937199",
"304969145788025292712645081382834762265",
"55475033319677080079028232284942777925",
"93108709857922557778934996415234657862",
"238409506178954703985571249492380193363",
"334489763760881161578011440515903067424",
"313078379247674934940563151226454943936",
"173982965929399846948233338510084149403",
"74749937967981944356734078024427311859",
"261611775575721783112386679651079016702",
"240875612841562075602743918415278049603",
"153507780003022223298345917597275906664",
"139281515781463497720913603012719684948",
"126423126618065682561068432605840427334",
"261972163381237158663412179938533523172",
"325634113847445301865108294493504514213",
"62383921793977080340360698376144406652",
"49481043399858473213008775178398368962",
"167016605452438641056639736304458821125",
"296560896529934964586560935792225208131",
"217396222089277436118865647145851696963",
"32185873764172523368496552023661691344",
"194821065541921394071541019563211725947",
"173580955536433138181737559856154575877"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2995fe23095ceda2dc382fbe057f5e164595548",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "parse_qcomsmem_part",
"file": "drivers/mtd/parsers/qcomsmempart.c"
},
"id": "CVE-2022-48777-fe42bc84",
"digest": {
"length": 2564.0,
"function_hash": "21964576472348037738915979055383430187"
},
"signature_type": "Function"
}
]