CVE Intelligence
High Memory corruption

CVE-2026-31477 — ksmbd: fix memory leaks and NULL deref in smb2_lock()

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix memory leaks and NULL deref in smb2_lock() smb2_lock() has three error handling issues after list_del() detaches smb_lock from lock_list at no_check_cl: 1) If vfs_lock_file() returns an unexpected error in the non-UNLOCK path, goto out leaks smb_lock and its flock because the out: handler only iterates lock_list and rollback_list, neither of which contains the detached smb_lock. 2) If vfs_lock_file() returns -ENOENT in the UNLOCK path, goto out leaks smb_lock and flock for the same reason. The error code returned to the dispatcher is also stale. 3) In the rollback path, smb_flock_init() can return NULL on allocation failure. The result is dereferenced unconditionally, causing a kernel NULL pointer dereference. Add a NULL check to prevent the crash and clean up the bookkeeping; the VFS lock itself cannot be rolled back without the allocation and will be released at file or connection teardown. Fix cases 1 and 2 by hoisting the locks_free_lock()/kfree() to before the if(!rc) check in the UNLOCK branch so all exit paths share one free site, and by freeing smb_lock and flock before goto out in the non-UNLOCK branch. Propagate the correct error code in both cases. Fix case 3 by wrapping the VFS unlock in an if(rlock) guard and adding a NULL check for locks_free_lock(rlock) in the shared cleanup. Found via call-graph analysis using sqry.

Published Apr 22, 2026 · Updated Oct 13, 2026 · Sources: NIST National Vulnerability Database, CVE Program (cve.org) e CISA ADP · CNA: Linux

Who exploits it and how urgent it is

A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.

No exploitation signal in the sources consulted so far.
How the score was calculated
  • EPSS 0.7% (30-day exploitation probability)+8
  • Technical severity (high)+6

The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.

Exploitation
Not confirmed
Not in CISA KEV — an absence of record, not proof it is unexploited.
EPSS FIRST
0.68%
ahead of 51% of scored CVEs · Oct 14, 2026
Affects
Linux
Linux and 1 more
CVSS base
7.5
High · 2 source(s)

Remediation

Fixes and mitigations documented by the sources — linked to the original advisory.

  • Documented patch — git.kernel.org (NIST National Vulnerability Database)
  • Documented patch — git.kernel.org (NIST National Vulnerability Database)
  • Documented patch — git.kernel.org (NIST National Vulnerability Database)
  • Documented patch — git.kernel.org (NIST National Vulnerability Database)
  • Documented patch — git.kernel.org (NIST National Vulnerability Database)
  • Documented patch — git.kernel.org (NIST National Vulnerability Database)

First 24 hours

Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.

  1. Identify exposed assets running the affected vendor/product/version combinations (Linux Linux, Linux Linux Kernel).
  2. The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
  3. Apply the fixed version or the patch documented under Remediation.
  4. Search available logs for exploit probes matching the vulnerability class (memory corruption), errors and authentication anomalies.

Affected scope

Vendor, product and versions as the sources word them.

VendorProductVersionsStatusSource
Linux Linux version 5.15≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and < 309b44ed684496ed3f9c5715d10b899338623512≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and < aab42f0795620cf0d3955a520f571f697d0f9a2a≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and < 3cdacd11b41569ce75b3162142240f2355e04900≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and < 91aeaa7256006d79a37298f5a1df23325db91599≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and < c9b95ef6f5039f19e46c3a521a4fe1752d91dfe9≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and < cdac6f7e7e428dc70e3b5898ac6999a72ed13993 Vulnerable CVE Program (cve.org) e CISA ADP
Linux Linux Kernel version 7.0-rc5version 7.0-rc7version 7.0-rc6≥ 5.15.1 and < 6.1.168version 7.0-rc4version 7.0-rc3version 7.0-rc2version 7.0-rc1
and 5 more version 5.15≥ 6.19 and < 6.19.11≥ 6.13 and < 6.18.21≥ 6.7 and < 6.12.80≥ 6.2 and < 6.6.131
Vulnerable NIST National Vulnerability Database

Attack characteristics

The CVSS vector, decoded. It describes the attack, not your exposure to it.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Every base score collected

Sources score independently and may disagree; each row says who scored it and under which version.

ScoreVersionSeverityExpl.ImpactScored by
7.5 CVSS 3.1 High 3.9 3.6 416baaa9-dc9f-4396-8d5f-8c081fb06d67 via NIST National Vulnerability Database
7.5 CVSS 3.1 High — — Linux via CVE Program (cve.org) e CISA ADP
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (score shown at the top: 416baaa9-dc9f-4396-8d5f-8c081fb06d67)

Weakness MITRE

Weakness class according to MITRE’s CWE catalog.

CWE-476 · NULL Pointer Dereference

Other CVEs with this weakness →

EPSS over time FIRST

Oct 13, 2026 → Oct 14, 2026 · 2 reading(s) · max 0.68%

Detection

Read off the CVSS vector and the weakness class. Starting points, not tested rules.

  • Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
  • Correlate service crashes/restarts with inbound traffic; repeated crashes may indicate attempts.
web/proxy/WAF logsnetwork IDS/IPSendpoint telemetry (EDR)crash dumps

Timeline

What happened to this CVE, newest first.

  • 2026
  • Affected products added · linux/linux
    Oct 13, 2026 · CVE Program (cve.org) e CISA ADP
  • Record published
    Oct 13, 2026
  • Fix documented
    Oct 13, 2026 · NIST National Vulnerability Database
  • CVSS changed · 7.5
    Oct 13, 2026 · NIST National Vulnerability Database
  • Source status changed · → Analyzed
    Oct 13, 2026 · NIST National Vulnerability Database
  • Record created in this database
    Oct 13, 2026 · NIST National Vulnerability Database
  • CVE published
    Apr 22, 2026 · Linux

Source activity

Repeated readings are counted rather than listed.

  • 1× Official description updated · Oct 13, 2026 – Oct 13, 2026

References

6 on the record

Elsewhere on this site

Linux
every CVE for this vendor
CWE-476
other pages naming this weakness

Related CVEs (same products)

  • Critical CVE-2026-99999 ipv4: validate checksum_start before completing checksum 7h
  • Unknown CVE-2026-98432 ipv4: free inet_opt and ireq_opt after an RCU grace period 7h
  • Unknown CVE-2026-98429 RDMA/efa: Keep EQ resources alive while IRQ is registered 1d
  • Unknown CVE-2026-98424 wifi: cfg80211: undo netns switch if renaming the wiphy fails 1d
  • Unknown CVE-2026-98425 wifi: mac80211: don't warn when an IBSS has no channel to scan 1d
  • Unknown CVE-2026-98426 wifi: mwifiex: fix IRQ leak using wrong index in MSI-X error path 1d

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • No CISA SSVC assessment.
  • No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.

Answered from this record

Text assembled only from the fields above — no additional claims.

What should defenders know first?

CVE-2026-31477 is "ksmbd: fix memory leaks and NULL deref in smb2_lock()", rated High. It affects Linux (Linux); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 7.5 describes technical severity. EPSS 0.68% estimates the probability of exploitation in 30 days; neither replaces your asset context. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.

Comments

Moderated technical discussion. Read the community guidelines.

No comments yet.

Sign in or create an account to comment and suggest corrections.