CVE-2026-31707: ksmbd: validate response sizes in ipc_validate_msg()
Noroxi assessment
Priority: Monitor (action score 28/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.12% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 299db777ea0cfa5c407e41b045c24a14c034c27b, 52518503a1a00bc33e9522c4eb05df023e3ae978, 7dd0c858e1909769a4c91842724315ee74f1a5f1.
Low priority for now. Upgrade to Linux Linux 299db777ea0cfa5c407e41b045c24a14c034c27b, 52518503a1a00bc33e9522c4eb05df023e3ae978, 7dd0c858e1909769a4c91842724315ee74f1a5f1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: ksmbd: validate response sizes in ipc_validate_msg() ipc_validate_msg() computes the expected message size for each response type by adding (or multiplying) attacker-controlled fields from the daemon response to a fixed struct size in unsigned int arithmetic. Three cases can overflow: KSMBD_EVENT_RPC_REQUEST: msg_sz = sizeof(struct ksmbd_rpc_command) + resp->payload_sz; KSMBD_EVENT_SHARE_CONFIG_REQUEST: msg_sz = sizeof(struct ksmbd_share_config_response) + resp->payload_sz; KSMBD_EVENT_LOGIN_REQUEST_EXT: msg_sz = sizeof(struct ksmbd_login_response_ext) + resp->ngroups * sizeof(gid_t); resp->payload_sz is __u32 and resp->ngroups is __s32. Each addition can wrap in unsigned int; the multiplication by sizeof(gid_t) mixes signed and size_t, so a negative ngroups is converted to SIZE_MAX before the multiply. A wrapped value of msg_sz that happens to equal entry->msg_sz bypasses the size check on the next line, and downstream consumers (smb2pdu.c:6742 memcpy using rpc_resp->payload_sz, kmemdup in ksmbd_alloc_user using resp_ext->ngroups) then trust the unverified length. Use check_add_overflow() on the RPC_REQUEST and SHARE_CONFIG_REQUEST paths to detect integer overflow without constraining functional payload size; userspace ksmbd-tools grows NDR responses in 4096-byte chunks for calls like NetShareEnumAll, so a hard transport cap is unworkable on the response side. For LOGIN_REQUEST_EXT, reject resp->ngroups outside the signed [0, NGROUPS_MAX] range up front and report the error from ipc_validate_msg() so it fires at the IPC boundary; with that bound the subsequent multiplication and addition stay well below UINT_MAX. The now-redundant ngroups check and pr_err in ksmbd_alloc_user() are removed. This is the response-side analogue of aab98e2dbd64 ("ksmbd: fix integer overflows on 32 bit systems"), which hardened the request side.
- Published
- May 1, 2026
- Updated
- Oct 30, 2026
- EPSS
- 0.1% · 2th percentile
- CWE
- CWE-787
Report tools
Action score
28
Monitor
Low priority for now.
- CVSS
- 28 / 40 · 7.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
CNA vs NVD score
- NVD
- —
- CNA · Linux
- 7.1
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel5.15 and later · before 6.12.84
- linux linux kernel6.13 and later · before 6.18.25
- linux linux kernel6.19 and later · before 7.0.2
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 5.15affected
- 0626e6641f6b467447c81dd7678a69c66f7746cf and later · before 52518503a1a00bc33e9522c4eb05df023e3ae978affected · git
- 0626e6641f6b467447c81dd7678a69c66f7746cf and later · before bf396208418371174869baba9434535cd3288e80affected · git
- 0626e6641f6b467447c81dd7678a69c66f7746cf and later · before 7dd0c858e1909769a4c91842724315ee74f1a5f1affected · git
- 0626e6641f6b467447c81dd7678a69c66f7746cf and later · before 299db777ea0cfa5c407e41b045c24a14c034c27baffected · git
- 0626e6641f6b467447c81dd7678a69c66f7746cf and later · before 99c631d0366c1eab8fb188fe66425f4581ebdde4affected · git
- 0626e6641f6b467447c81dd7678a69c66f7746cf and later · before d6a6aa81eac2c9bff66dc6e191179cb69a14426baffected · git
- before 5.15not affected · semver
- 6.1.191 and later · up to and including 6.1.*not affected · semver
- 6.6.141 and later · up to and including 6.6.*not affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | from 0 | — |
| Debian:13 | linux | before 6.12.85-1 | 6.12.85-1 |
| Debian:14 | linux | before 7.0.3-1 | 7.0.3-1 |
| openSUSE:Tumbleweed | kernel-source | before 7.0.7-1.1 | 7.0.7-1.1 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2026-31705May 1, 2026 · ksmbd: fix out-of-bounds write in smb2_get_ea() EA alignment39Monitor
- ← EarlierCVE-2026-31706May 1, 2026 · ksmbd: validate num_aces and harden ACE walk in smb_inherit_dacl()35Monitor
- Later →CVE-2026-31708May 1, 2026 · smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path32Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 299db777ea0cfa5c407e41b045c24a14c034c27b | Vendor (CNA) |
| Linux Linux | 52518503a1a00bc33e9522c4eb05df023e3ae978 | Vendor (CNA) |
| Linux Linux | 7dd0c858e1909769a4c91842724315ee74f1a5f1 | Vendor (CNA) |
| Linux Linux | 99c631d0366c1eab8fb188fe66425f4581ebdde4 | Vendor (CNA) |
| Linux Linux | bf396208418371174869baba9434535cd3288e80 | Vendor (CNA) |
| Linux Linux | d6a6aa81eac2c9bff66dc6e191179cb69a14426b | Vendor (CNA) |
| debian:linux | 6.12.85-1 · Debian:13 | Package registry (OSV) |
| opensuse:kernel-source | 7.0.7-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-787 · Out-of-bounds WriteCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (5 more)Show less
- git.kernel.org/stable/c/52518503a1a00bc33e9522c4eb05df023e3ae978
- git.kernel.org/stable/c/7dd0c858e1909769a4c91842724315ee74f1a5f1
- git.kernel.org/stable/c/99c631d0366c1eab8fb188fe66425f4581ebdde4
- git.kernel.org/stable/c/bf396208418371174869baba9434535cd3288e80
- git.kernel.org/stable/c/d6a6aa81eac2c9bff66dc6e191179cb69a14426b
Vendor advisories and official records. Exploit/PoC links are deliberately left out.