CVE-2024-57881

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-57881
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-57881.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-57881
Downstream
Related
Published
2025-01-11T15:10:43Z
Modified
2025-10-17T20:02:33.515101Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()
Details

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

mm/pagealloc: don't call pfntopage() on possibly non-existent PFN in splitlarge_buddy()

In splitlargebuddy(), we might call pfntopage() on a PFN that might not exist. In corner cases, such as when freeing the highest pageblock in the last memory section, this could result with CONFIGSPARSEMEM && !CONFIGSPARSEMEMEXTREME in _pfntosection() returning NULL and and _sectionmemmapaddr() dereferencing that NULL pointer.

Let's fix it, and avoid doing a pfntopage() call for the first iteration, where we already have the page.

So far this was found by code inspection, but let's just CC stable as the fix is easy.

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
fd919a85cd55be5d00a6a7372071f44c8eafb825
Fixed
4234ca9884bcae9e48ed38652d91696ad5cd591d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fd919a85cd55be5d00a6a7372071f44c8eafb825
Fixed
faeec8e23c10bd30e8aa759a2eb3018dae00f924

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.2
v6.12.3
v6.12.4
v6.12.5
v6.12.6
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.9
v6.9-rc5
v6.9-rc6
v6.9-rc7

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.12.7