CVE Database›Document archive›CVE-2025-21772

CVE-2025-21772

kernel: partitions: mac: fix handling of bogus partition table

Loading…

Severity

Moderate

Red Hat Product Security

7.1

CVSS 3.1

Review impact separately from score.

Published · February 27, 2025

Updated · October 30, 2026

Description

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 put_dev_sector(), since the preceding read_part_sector() 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().

Statement

This vulnerability is evaluated with a Moderate severity impact because triggering the issue requires presenting a maliciously crafted storage medium to the kernel's partition probing subsystem. While a successful exploit can trigger an out-of-bounds memory read resulting in a kernel crash or potential leakage of kernel memory, it is bounded by the prerequisite of local physical access or privileges to attach block devices. Under typical Red Hat Enterprise Linux server deployments, block devices from untrusted sources are not automatically attached or mounted, significantly reducing the practical attack surface.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 7.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

CWE-125 · Out-of-bounds Read