CVE-2022-49964

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49964
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49964.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49964
Downstream
Related
Published
2025-06-18T11:15:23Z
Modified
2025-08-09T19:01:26Z
Summary
[none]
Details

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

arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level

Though acpifindlastcachelevel() always returned signed value and the document states it will return any errors caused by lack of a PPTT table, it never returned negative values before.

Commit 0c80f9e165f8 ("ACPI: PPTT: Leave the table mapped for the runtime usage") however changed it by returning -ENOENT if no PPTT was found. The value returned from acpifindlastcachelevel() is then assigned to unsigned fw_level.

It will result in the number of cache leaves calculated incorrectly as a huge value which will then cause the following warning from _allocpages as the order would be great than MAX_ORDER because of incorrect and huge cache leaves value.

| WARNING: CPU: 0 PID: 1 at mm/pagealloc.c:5407 _allocpages+0x74/0x314 | Modules linked in: | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-10393-g7c2a8d3ac4c0 #73 | pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : _allocpages+0x74/0x314 | lr : allocpages+0xe8/0x318 | Call trace: | _allocpages+0x74/0x314 | allocpages+0xe8/0x318 | kmallocordertrace+0x68/0x1dc | _kmalloc+0x240/0x338 | detectcacheattributes+0xe0/0x56c | updatesiblingsmasks+0x38/0x284 | storecputopology+0x78/0x84 | smppreparecpus+0x48/0x134 | kernelinitfreeable+0xc4/0x14c | kernelinit+0x2c/0x1b4 | retfrom_fork+0x10/0x20

Fix the same by changing fwlevel to be signed integer and return the error from initcache_level() early in case of error.

References

Affected packages