CVE-2025-21772

Source
https://cve.org/CVERecord?id=CVE-2025-21772
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21772.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-21772
Downstream
Related
Published
2025-02-27T02:18:19.528Z
Modified
2026-03-20T12:41:09.846691Z
Summary
partitions: mac: fix handling of bogus partition table
Details

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

partitions: mac: fix handling of bogus partition table

Fix several issues in partition probing:

  • The bailout for a bad partoffset must use putdevsector(), since the preceding readpartsector() succeeded.
  • If the partition table claims a silly sector size like 0xfff bytes (which results in partition table entries straddling sector boundaries), bail out instead of accessing out-of-bounds memory.
  • We must not assume that the partition table contains proper NUL termination - use strnlen() and strncmp() instead of strlen() and strcmp().
Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21772.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
02e2a5bfebe99edcf9d694575a75032d53fe1b73
Fixed
a3e77da9f843e4ab93917d30c314f0283e28c124
Fixed
213ba5bd81b7e97ac6e6190b8f3bc6ba76123625
Fixed
40a35d14f3c0dc72b689061ec72fc9b193f37d1f
Fixed
27a39d006f85e869be68c1d5d2ce05e5d6445bf5
Fixed
92527100be38ede924768f4277450dfe8a40e16b
Fixed
6578717ebca91678131d2b1f4ba4258e60536e9f
Fixed
7fa9706722882f634090bfc9af642bf9ed719e27
Fixed
80e648042e512d5a767da251d44132553fe04ae0
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
81a319c5c29913a23947f3d28513974682f3af03
Last affected
34a906cd9f6445d9510841667eff0d980279ebf3
Last affected
2a27f61bd411e564eb4651c18d225f6e9e1de534
Last affected
69aad7e01c8e883e9d2f8dc5523bd419bd02d2aa
Last affected
7f4f03c4a1e9a4b9679feafe7625a780864a4e76

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21772.json"