Security advisory · Linux kernel
CVE-2026-31705: a vulnerability in the Linux kernel
CVE-2026-31705: An out-of-bounds write in the ksmbd smb2_get_ea() handler can overwrite adjacent kernel heap memory when alignment padding is applied unconditionally after writing an EA value. Prioritise any internet-facing service first. The affected versions, the fix and the CVSS score below come straight from the CVE record, not our interpretation.
- CVE ID
- CVE-2026-31705
- Published
- May 1, 2026
- CVSS
- 9.8 (Critical), CVSS 3.1 — assigned by Linux kernel (kernel.org) (NVD has not published its own score)
- Affected
- from 5.15.145, 6.1.71, 6.13, 6.19 up to the fixed release
- Fixed in
- 5.16, 6.12.84, 6.18.25, 6.2
- Assigned by
- Linux kernel (kernel.org)
What is CVE-2026-31705?
The flaw is an out-of-bounds (OOB) write in ksmbd's smb2_get_ea() routine where 4-byte alignment padding is applied with memset() after writing each extended attribute (EA) entry. The code checks buf_free_len before copying the EA value, but performs the alignment memset unconditionally afterward without verifying remaining space. If the EA value exactly consumes the remaining buffer (buf_free_len == 0 after value subtraction), the subsequent alignment memset writes 1–3 NUL bytes past the buffer boundary. The vulnerable scenario is more likely in compound requests that share a response buffer across commands: an earlier command (for example, READ) can consume most of the shared buffer and leave only a tight remainder for the QUERY_INFO EA response, so the alignment padding overwrites adjacent kernel heap memory. The impact is kernel memory corruption which can lead to crashes or potential privilege escalation.
Am I affected?
Affected: the Linux kernel from 5.15.145, 6.1.71, 6.13, 6.19 up to the fixed release. Fixed in: 5.16, 6.12.84, 6.18.25, 6.2.
How do I fix it?
Install your distribution's current kernel security update and reboot — the fix only takes effect once the patched kernel is actually running.
# Debian / Ubuntu
sudo apt update && sudo apt full-upgrade
sudo reboot
# RHEL / AlmaLinux / Rocky Linux
sudo dnf upgrade --refresh
sudo reboot
How HostCrust helps you see it
The trap with kernel CVEs is the gap between “installed” and “running”. Patch Proof checks each server against its distribution's own security data, per CVE, and it checks the kernel that is actually booted, not just the newest one on disk — so it keeps reporting a kernel CVE as open until the patched kernel is the one running.
How we checked this: Every fact on this page — the CVE id, the affected and fixed versions, the CVSS score and the remediation — was taken from the CVE's NVD record and the vendor or CNA advisory linked under Sources, and checked on December 2, 2026. HostCrust did not independently reproduce the vulnerability. Anything we didn't run ourselves comes from the official documentation listed under Sources.
Check which CVEs are really open on your server
HostCrust Patch Proof compares every installed package with your distribution's own security data. It counts fixes your distro backported and checks the kernel that is actually running, not just the one on disk. Read-only, no root, free.
FAQ
How severe is CVE-2026-31705?
Linux kernel (kernel.org) has assigned a CVSS base score of 9.8 (Critical) (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). The National Vulnerability Database has not published its own score for this CVE, so this figure is the assigning authority's rather than NVD's. Severity scores can be revised as a CVE is analysed, so check the NVD record and the vendor advisory under Sources for the current figure.
How do I fix it?
Install your distribution's or vendor's fixed release for the Linux kernel and restart the affected service (or reboot, for a kernel fix). The commands are in the section above.
Where do these facts come from?
Every fact on this page — the CVE id, the affected and fixed versions, the CVSS score and the remediation — is copied from the CVE's NVD record and the vendor or CNA advisory linked under Sources. HostCrust reformats the official facts; it does not add its own.