Security Vulnerability Report
中文
CVE-2023-54285 CVSS 7.8 HIGH

CVE-2023-54285

Published: 2025-12-30 13:16:18
Last Modified: 2026-02-26 18:44:44
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: iomap: Fix possible overflow condition in iomap_write_delalloc_scan folio_next_index() returns an unsigned long value which left shifted by PAGE_SHIFT could possibly cause an overflow on 32-bit system. Instead use folio_pos(folio) + folio_size(folio), which does this correctly.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 5.15.x (具体版本需查看内核git提交记录)
Linux Kernel < 6.1.x
Linux Kernel < 6.2.x
受影响系统:启用iomap子系统的32位Linux系统

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2023-54285 - Integer overflow in iomap_write_delalloc_scan // This is a conceptual PoC demonstrating the vulnerable code path #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <sys/stat.h> /* * Vulnerable code pattern (before fix): * unsigned long index = folio_next_index(folio); * unsigned long end = index << PAGE_SHIFT; // Potential overflow on 32-bit * * Fixed code pattern: * unsigned long end = folio_pos(folio) + folio_size(folio); // Safe calculation */ int main() { const char *test_file = "/tmp/test_iomap_overflow"; int fd; char buffer[8192]; // Create a test file fd = open(test_file, O_RDWR | O_CREAT, 0644); if (fd < 0) { perror("Failed to create test file"); return 1; } // Write data to trigger delalloc write path memset(buffer, 'A', sizeof(buffer)); for (int i = 0; i < 100; i++) { write(fd, buffer, sizeof(buffer)); } // Force sync to trigger iomap_write_delalloc_scan fsync(fd); close(fd); unlink(test_file); printf("Test completed - check system logs for any overflow warnings\n"); return 0; } /* * Exploitation notes: * - Requires local access with low privileges * - Target: 32-bit Linux systems with vulnerable kernel versions * - Trigger: File operations that go through iomap (e.g., ext4, xfs) * - Impact: Memory corruption, potential privilege escalation */

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2023-54285", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-12-30T13:16:17.520", "lastModified": "2026-02-26T18:44:44.413", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niomap: Fix possible overflow condition in iomap_write_delalloc_scan\n\nfolio_next_index() returns an unsigned long value which left shifted\nby PAGE_SHIFT could possibly cause an overflow on 32-bit system. Instead\nuse folio_pos(folio) + folio_size(folio), which does this correctly."}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\niomap: Corrige una posible condición de desbordamiento en iomap_write_delalloc_scan\n\nfolio_next_index() devuelve un valor unsigned long que, desplazado a la izquierda por PAGE_SHIFT, podría causar un desbordamiento en sistemas de 32 bits. En su lugar, usa folio_pos(folio) + folio_size(folio), lo cual lo hace correctamente."}], "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:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1.92", "versionEndExcluding": "6.1.162", "matchCriteriaId": "EF308B9C-AA43-45E0-9C7A-7A508F307794"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.5.5", "matchCriteriaId": "8CF71E85-DA24-4925-95C5-E5C15DA71AE6"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/0c6cf409093f307ee05114f834516730c0da5b21", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/5c281b0c5d18c8eeb1cfd5023f4adb153e6d1240", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/eee2d2e6ea5550118170dbd5bb1316ceb38455fb", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}