Security Vulnerability Report
中文
CVE-2026-23256 CVSS 5.5 MEDIUM

CVE-2026-23256

Published: 2026-03-18 18:16:24
Last Modified: 2026-05-21 00:13:21
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: net: liquidio: Fix off-by-one error in VF setup_nic_devices() cleanup In setup_nic_devices(), the initialization loop jumps to the label setup_nic_dev_free on failure. The current cleanup loop while(i--) skip the failing index i, causing a memory leak. Fix this by changing the loop to iterate from the current index i down to 0. Compile tested only. Issue found using code review.

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:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux kernel liquidio driver < 修复版本 (commit 01fbca1e93ec3f39f76c31a8f9afa32ce00da48a)
Linux kernel stable versions < 6.12.y
Linux kernel stable versions < 6.11.y
Linux kernel stable versions < 6.6.y
Linux kernel stable versions < 6.1.y

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2026-23256 PoC - Liquidio VF setup_nic_devices Memory Leak * This PoC demonstrates the off-by-one error in cleanup loop * Compile: gcc -o cve_2026_23256_poc cve_2026_23256_poc.c */ #include <stdio.h> #include <stdlib.h> #include <string.h> /* Simulated nic device structure */ struct nic_device { void *data; int id; }; #define MAX_DEVICES 8 /* Vulnerable cleanup function - original buggy version */ void buggy_cleanup(struct nic_device *devices, int i) { printf("[BUGGY] Cleanup loop with while(i--):\n"); printf("[BUGGY] Failed at index: %d\n", i); int count = 0; while (i--) { printf("[BUGGY] Freeing device at index: %d\n", i); if (devices[i].data) { free(devices[i].data); devices[i].data = NULL; count++; } } printf("[BUGGY] Freed %d devices, skipped index %d (LEAK)\n\n", count, i); } /* Fixed cleanup function */ void fixed_cleanup(struct nic_device *devices, int i) { printf("[FIXED] Cleanup loop with for(i--; i>=0; i--):\n"); printf("[FIXED] Failed at index: %d\n", i); int count = 0; for (int j = i; j >= 0; j--) { printf("[FIXED] Freeing device at index: %d\n", j); if (devices[j].data) { free(devices[j].data); devices[j].data = NULL; count++; } } printf("[FIXED] Freed %d devices including failed index %d (NO LEAK)\n\n", count, i); } int main() { struct nic_device devices[MAX_DEVICES]; int fail_index = 3; printf("=== CVE-2026-23256 PoC Demonstration ===\n\n"); /* Simulate device allocation */ for (int i = 0; i < MAX_DEVICES; i++) { devices[i].data = malloc(1024); devices[i].id = i; memset(devices[i].data, 0, 1024); printf("[INIT] Allocated device %d\n", i); } printf("\nSimulating initialization failure at index %d:\n\n", fail_index); /* Demonstrate buggy cleanup */ buggy_cleanup(devices, fail_index); /* Reset devices for fixed version */ for (int i = 0; i < MAX_DEVICES; i++) { if (!devices[i].data) { devices[i].data = malloc(1024); memset(devices[i].data, 0, 1024); } } /* Demonstrate fixed cleanup */ fixed_cleanup(devices, fail_index); printf("\n=== PoC Complete ===\n"); printf("The buggy version leaks device at index %d\n", fail_index); printf("The fixed version properly frees all allocated devices\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23256", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-18T18:16:23.817", "lastModified": "2026-05-21T00:13:21.407", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: liquidio: Fix off-by-one error in VF setup_nic_devices() cleanup\n\nIn setup_nic_devices(), the initialization loop jumps to the label\nsetup_nic_dev_free on failure. The current cleanup loop while(i--)\nskip the failing index i, causing a memory leak.\n\nFix this by changing the loop to iterate from the current index i\ndown to 0.\n\nCompile tested only. Issue found using code review."}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nnet: liquidio: Corrección de error de uno en la limpieza de VF setup_nic_devices()\n\nEn setup_nic_devices(), el bucle de inicialización salta a la etiqueta setup_nic_dev_free en caso de fallo. El bucle de limpieza actual while(i--) omite el índice i que falla, causando una fuga de memoria.\n\nEsto se corrige cambiando el bucle para que itere desde el índice actual i hasta 0.\n\nSolo probado en compilación. Problema encontrado mediante revisión de código."}], "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-193"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.10", "versionEndExcluding": "5.10.250", "matchCriteriaId": "1B676F61-BFDD-4B02-B8A2-213461368D04"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.200", "matchCriteriaId": "D16F6370-B70F-471C-8363-3A17B0BB1DA9"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.163", "matchCriteriaId": "E9C856E1-4308-4C0B-A973-7DD375DF66C4"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.6.124", "matchCriteriaId": "76183B9F-CABE-4E21-A3E3-F0EBF99DC3C7"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.7", "versionEndExcluding": "6.12.70", "matchCriteriaId": "F3791390-0628-4808-99EF-1ED8ABF60933"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.13", "versionEndExcluding": "6.18.10", "matchCriteriaId": "7156C23F-009E-4D05-838C-A2DA417B5B8D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*", "matchCriteriaId": "17B67AA7-40D6-4AFA-8459-F200F3D7CFD1"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*", "matchCriteriaId": "C47E4CC9-C826-4FA9-B014-7FE3D9B318B2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*", "matchCriteriaId": "F71D92C0-C023-48BD-B3B6-70B638EEE298"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*", "matchCriteriaId": "13580667-0A98-40CC-B29F-D12790B91BDB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*", "matchCriteriaId": "CAD1FED7-CF48-47BF-AC7D-7B6FA3C065FC"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*", "matchCriteriaId": "3EF854A1-ABB1-4E93-BE9A-44569EC76C0D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*", "matchCriteriaId": "F5DC0CA6-F0AF-4DDF-A882-3DADB9A886A7"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*", "matchCriteriaId": "EB5B7DFC-C36B-45D8-922C-877569FDDF43"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/01fbca1e93ec3f39f76c31a8f9afa32ce00da48a", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/3bf519e39b51cb08a93c0599870b35a23db1031e", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/4640fa5ad5e1a0dbd1c2d22323b7d70a8107dcfd", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/52b19b3a22306fe452ec9e8ff96063f4bfb77b99", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67" ... (truncated)