CVE-2022-48777

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-48777
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48777.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-48777
Downstream
Related
Published
2024-07-16T11:13:15Z
Modified
2025-10-21T08:10:42.126248Z
Summary
mtd: parsers: qcom: Fix kernel panic on skipped partition
Details

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.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
803eb124e1a64e42888542c3444bfe6dac412c7f
Fixed
eb03cb6e03ffd9173e18e5fe87e4e3ce83820453
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
803eb124e1a64e42888542c3444bfe6dac412c7f
Fixed
a2995fe23095ceda2dc382fbe057f5e164595548
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
803eb124e1a64e42888542c3444bfe6dac412c7f
Fixed
65d003cca335cabc0160d3cd7daa689eaa9dd3cd

Affected versions

v5.*

v5.11
v5.11-rc2
v5.11-rc3
v5.11-rc4
v5.11-rc5
v5.11-rc6
v5.11-rc7
v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.11
v5.15.12
v5.15.13
v5.15.14
v5.15.15
v5.15.16
v5.15.17
v5.15.18
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.3
v5.15.4
v5.15.5
v5.15.6
v5.15.7
v5.15.8
v5.15.9
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.16.1
v5.16.10
v5.16.2
v5.16.3
v5.16.4
v5.16.5
v5.16.6
v5.16.7
v5.16.8
v5.16.9
v5.17-rc1

Database specific

vanir_signatures

[
    {
        "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"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.12.0
Fixed
5.15.25
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.16.11