CVE-2024-26712

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26712
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-26712.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-26712
Downstream
Published
2024-04-03T14:55:14.149Z
Modified
2025-11-28T02:34:32.737976Z
Severity
  • 4.4 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
powerpc/kasan: Fix addr error caused by page alignment
Details

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

powerpc/kasan: Fix addr error caused by page alignment

In kasaninitregion, when kstart is not page aligned, at the begin of for loop, kcur = kstart & PAGEMASK is less than kstart, and then va = block + k_cur - k_start is less than block, the addr va is invalid, because the memory address space from va to block is not alloced by memblockalloc, which will not be reserved by memblock_reserve later, it will be used by other places.

As a result, memory overwriting occurs.

for example: int _init _weak kasaninitregion(void start, size_t size) { [...] / if say block(dcd97000) kstart(feef7400) kend(feeff3fe) / block = memblock_alloc(k_end - k_start, PAGE_SIZE); [...] for (k_cur = k_start & PAGE_MASK; k_cur < k_end; k_cur += PAGE_SIZE) { / at the begin of for loop * block(dcd97000) va(dcd96c00) kcur(feef7000) kstart(feef7400) * va(dcd96c00) is less than block(dcd97000), va is invalid */ void *va = block + kcur - kstart; [...] } [...] }

Therefore, page alignment is performed on kstart before memblockalloc() to ensure the validity of the VA address.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26712.json"
}
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
663c0c9496a69f80011205ba3194049bcafd681d
Fixed
230e89b5ad0a33f530a2a976b3e5e4385cb27882
Fixed
2738e0aa2fb24a7ab9c878d912dc2b239738c6c6
Fixed
0c09912dd8387e228afcc5e34ac5d79b1e3a1058
Fixed
0516c06b19dc64807c10e01bb99b552bdf2d7dbe
Fixed
70ef2ba1f4286b2b73675aeb424b590c92d57b25
Fixed
4a7aee96200ad281a5cc4cf5c7a2e2a49d2b97b0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
5ce93076d8ee2a0fac3ad4adbd2e91b6197146db

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.4.0
Fixed
5.10.210
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.149
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.79
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.18
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.6