CVE-2022-49436

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49436
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49436.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49436
Related
Published
2025-02-26T07:01:20Z
Modified
2025-02-26T07:01:20Z
Downstream
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

powerpc/paprscm: Fix leaking nvdimmevents_map elements

Right now 'char *' elements allocated for individual 'statid' in 'paprscmpriv.nvdimmeventsmap[]' during paprscmpmucheckevents(), get leaked in paprscmremove() and paprscmpmuregister(), paprscmpmucheckevents() error paths.

Also individual 'statid' arent NULL terminated 'char *' instead they are fixed 8-byte sized identifiers. However paprscmpmuregister() assumes it to be a NULL terminated 'char *' and at other places it assumes it to be a 'paprscmperfstat.statid' sized string which is 8-byes in size.

Fix this by allocating the memory for paprscmpriv.nvdimmeventsmap to also include space for 'statid' entries. This is possible since number of available events/statids are known upfront. This saves some memory and one extra level of indirection from 'nvdimmeventsmap' to 'statid'. Also rest of the code can continue to call 'kfree(paprscmpriv.nvdimmevents_map)' without needing to iterate over the array and free up individual elements.

References

Affected packages

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.18.5-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.18.5-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}