Linux Kernel up to 6.19.10 ksmbd smb2_lock memory leak

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.5$0-$5k0.00

Summaryinfo

A vulnerability, which was classified as critical, has been found in Linux Kernel up to 6.1.167/6.6.130/6.12.79/6.18.20/6.19.10. Affected by this vulnerability is the function smb2_lock of the component ksmbd. The manipulation leads to memory leak. This vulnerability is traded as CVE-2026-31477. There is no exploit available. It is advisable to upgrade the affected component.

Detailsinfo

A vulnerability was found in Linux Kernel up to 6.1.167/6.6.130/6.12.79/6.18.20/6.19.10. It has been rated as critical. This issue affects the function smb2_lock of the component ksmbd. The manipulation with an unknown input leads to a memory leak vulnerability. Using CWE to declare the problem leads to CWE-401. The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. Impacted is availability. The summary by CVE is:

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.

It is possible to read the advisory at git.kernel.org. The identification of this vulnerability is CVE-2026-31477 since 03/09/2026. Technical details of the vulnerability are known, but there is no available exploit.

Upgrading to version 6.1.168, 6.6.131, 6.12.80, 6.18.21 or 6.19.11 eliminates this vulnerability. Applying the patch cdac6f7e7e428dc70e3b5898ac6999a72ed13993/c9b95ef6f5039f19e46c3a521a4fe1752d91dfe9/91aeaa7256006d79a37298f5a1df23325db91599/3cdacd11b41569ce75b3162142240f2355e04900/aab42f0795620cf0d3955a520f571f697d0f9a2a/309b44ed684496ed3f9c5715d10b899338623512 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at CERT Bund (WID-SEC-2026-1252). Be aware that VulDB is the high quality source for vulnerability data.

Affected

  • Google Container-Optimized OS
  • Debian Linux
  • Red Hat Enterprise Linux
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • SUSE openSUSE
  • RESF Rocky Linux
  • Open Source Linux Kernel

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.7
VulDB Meta Temp Score: 5.5

VulDB Base Score: 5.7
VulDB Temp Score: 5.5
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Memory leak
CWE: CWE-401 / CWE-404
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 6.1.168/6.6.131/6.12.80/6.18.21/6.19.11
Patch: cdac6f7e7e428dc70e3b5898ac6999a72ed13993/c9b95ef6f5039f19e46c3a521a4fe1752d91dfe9/91aeaa7256006d79a37298f5a1df23325db91599/3cdacd11b41569ce75b3162142240f2355e04900/aab42f0795620cf0d3955a520f571f697d0f9a2a/309b44ed684496ed3f9c5715d10b899338623512

Timelineinfo

03/09/2026 CVE reserved
04/22/2026 +43 days Advisory disclosed
04/22/2026 +0 days VulDB entry created
06/17/2026 +56 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2026-31477 (🔒)
GCVE (CVE): GCVE-0-2026-31477
GCVE (VulDB): GCVE-100-358919
CERT Bund: WID-SEC-2026-1252 - Linux Kernel: Mehrere Schwachstellen

Entryinfo

Created: 04/22/2026 17:19
Updated: 06/17/2026 22:59
Changes: 04/22/2026 17:19 (59), 06/17/2026 22:59 (7)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!