CVE-2026-31705
Vulnerability Summary
Timeline
Description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix out-of-bounds write in smb2_get_ea() EA alignment smb2_get_ea() applies 4-byte alignment padding via memset() after writing each EA entry. The bounds check on buf_free_len is performed before the value memcpy, but the alignment memset fires unconditionally afterward with no check on remaining space. When the EA value exactly fills the remaining buffer (buf_free_len == 0 after value subtraction), the alignment memset writes 1-3 NUL bytes past the buf_free_len boundary. In compound requests where the response buffer is shared across commands, the first command (e.g., READ) can consume most of the buffer, leaving a tight remainder for the QUERY_INFO EA response. The alignment memset then overwrites past the physical kvmalloc allocation into adjacent kernel heap memory. Add a bounds check before the alignment memset to ensure buf_free_len can accommodate the padding bytes. This is the same bug pattern fixed by commit beef2634f81f ("ksmbd: fix potencial OOB in get_file_all_info() for compound requests") and commit fda9522ed6af ("ksmbd: fix OOB write in QUERY_INFO for compound requests"), both of which added bounds checks before unconditional writes in QUERY_INFO response handlers.
CVSS Metrics
- v4.0•HIGH•Score: 8.7CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- v3.1•CRITICAL•Score: 9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Trends
Current EPSS score: 0.39%• Percentile: 33%
Techniques & Countermeasures
- CWE-787•Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
Affected Systems
- chainguard•linux-aws-6.18
< 6.18.31-r0
- chainguard•linux-azure-6.18
< 6.18.24-r1 | < 6.18.31-r0
- chainguard•linux-gcp-6.18
< 6.18.31-r0
- chainguard•linux-qemu-6.18
< 6.18.24-r3
- chainguard•linux-qemu-rc
< 7.1_rc3-r0
- chainguard•linux-vmware-6.18
< 6.18.31-r0
- debian•linux
< 6.1.176-1 | < 6.12.85-1 | < 7.0.3-1
- debian•linux-6.1
< 6.1.176-1~deb11u1
- ubuntu•linux
< 5.15.0-187.197 | < 6.8.0-136.136 | all | < 7.0.0-27.27
- ubuntu•linux-allwinner-5.19
all
- ubuntu•linux-aws
< 5.15.0-1113.120 | < 6.8.0-1061.64 | all | < 7.0.0-1008.8
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.11
all
- ubuntu•linux-aws-5.13
all
- ubuntu•linux-aws-5.15
all | < 5.15.0-1114.121~20.04.1
- ubuntu•linux-aws-5.19
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.8
all
- ubuntu•linux-aws-6.14
all
- ubuntu•linux-aws-6.17
all
- ubuntu•linux-aws-6.2
all
- ubuntu•linux-aws-6.5
all
- ubuntu•linux-aws-6.8
< 6.8.0-1061.64~22.04.1
- ubuntu•linux-aws-fips
< 5.15.0-1113.120+fips1 | < 6.8.0-1061.64+fips1
- ubuntu•linux-azure
all | < 5.15.0-1118.127 | < 6.8.0-1063.71 | all | < 7.0.0-1010.10
- ubuntu•linux-azure-5.11
all
- ubuntu•linux-azure-5.13
all
- ubuntu•linux-azure-5.15
all | < 5.15.0-1119.128~20.04.1
- ubuntu•linux-azure-5.19
all
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.8
all
- ubuntu•linux-azure-6.11
all
- ubuntu•linux-azure-6.14
all
- ubuntu•linux-azure-6.17
< 6.17.0-1022.22
- ubuntu•linux-azure-6.2
all
- ubuntu•linux-azure-6.5
all
- ubuntu•linux-azure-6.8
< 6.8.0-1063.71~22.04.1
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all | < 5.15.0-1118.127 | < 6.8.0-1062.69 | all | < 7.0.0-1009.9
- ubuntu•linux-azure-fde-5.15
all | < 5.15.0-1118.127~20.04.1
- ubuntu•linux-azure-fde-5.19
all
- ubuntu•linux-azure-fde-6.14
all
- ubuntu•linux-azure-fde-6.2
all
- ubuntu•linux-azure-fde-6.8
< 6.8.0-1062.69~22.04.1
- ubuntu•linux-azure-fips
< 5.15.0-1118.127+fips1 | < 6.8.0-1063.71+fips2
- ubuntu•linux-azure-nvidia
all
- ubuntu•linux-azure-nvidia-6.14
all
- ubuntu•linux-bluefield
all | < 5.15.0-1097.99 | < 6.8.0-1028.33
- ubuntu•linux-fips
all | < 5.15.0-190.200+fips1 | < 6.8.0-136.136+fips2
- ubuntu•linux-gcp
all | all | < 5.15.0-1114.124 | < 6.8.0-1064.72 | all | < 7.0.0-1007.7
Showing first 50 affected entries in server-rendered view.
References (43)
- https://git.kernel.org/stable/c/ffbce350c6fd1e99116ea57383b9031717e36d3b
- https://git.kernel.org/stable/c/98f3de6ef4efbd899348d333f0902dc4ff14380c
- https://git.kernel.org/stable/c/790304c02bf9bd7b8171feda4294d6e62d32ae8f
- https://git.kernel.org/stable/c/922d48fe8c19f388ffa2f709f33acaae4e408de2
- https://git.kernel.org/stable/c/30010c952077a1c89ecdd71fc4d574c75a8f5617
- https://git.kernel.org/stable/c/ddbbc8b2a09dd2cfed90871313e3691ae1db08a2
- https://ubuntu.com/security/CVE-2026-31705
- https://www.cve.org/CVERecord?id=CVE-2026-31705
- https://git.kernel.org/linus/30010c952077a1c89ecdd71fc4d574c75a8f5617
- https://ubuntu.com/security/notices/USN-8488-1
- https://ubuntu.com/security/notices/USN-8488-2
- https://ubuntu.com/security/notices/USN-8507-1
- https://ubuntu.com/security/notices/USN-8569-1
- https://ubuntu.com/security/notices/USN-8567-1
- https://ubuntu.com/security/notices/USN-8574-1
- https://ubuntu.com/security/notices/USN-8574-2
- https://ubuntu.com/security/notices/USN-8595-1
- https://ubuntu.com/security/notices/USN-8596-1
- https://ubuntu.com/security/notices/USN-8603-1
- https://ubuntu.com/security/notices/USN-8595-2
- https://ubuntu.com/security/notices/USN-8606-1
- https://ubuntu.com/security/notices/USN-8607-1
- https://ubuntu.com/security/notices/USN-8608-1
- https://ubuntu.com/security/notices/USN-8609-1
- https://ubuntu.com/security/notices/USN-8574-3
- https://ubuntu.com/security/notices/USN-8595-3
- https://ubuntu.com/security/notices/USN-8619-1
- https://ubuntu.com/security/notices/USN-8631-1
- https://ubuntu.com/security/notices/USN-8636-1
- https://security-tracker.debian.org/tracker/CVE-2026-31705
- https://ubuntu.com/security/notices/USN-8631-2
- https://ubuntu.com/security/notices/USN-8631-3
- https://ubuntu.com/security/notices/USN-8631-4
- https://ubuntu.com/security/notices/USN-8636-2
- https://ubuntu.com/security/notices/USN-8661-1
- https://ubuntu.com/security/notices/USN-8665-1
- https://ubuntu.com/security/notices/USN-8669-1
- https://ubuntu.com/security/notices/USN-8661-2
- https://ubuntu.com/security/notices/USN-8661-3
- https://ubuntu.com/security/notices/USN-8661-4
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31705.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-31705
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git