Memory Leak Vulnerability in Linux Kernel's ksmbd Package

linux Updated 02 Oct 2025

Summary

26/02/2025
N/A
Yes i
Medium
5.5

CVE-2022-49366: In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix reference count leak in smb_check_perm_dacl() The issue happens in a specific path in smb_check_perm_dacl(). Affects linux versions < 5.18.5-1. Fixed in 5.18.5-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Linux kernel is a core component of many operating systems, providing essential services for hardware and software interaction. The ksmbd module enables SMB (Server Message Block) protocol support, allowing file sharing and printing services over a network. This vulnerability specifically affects the handling of access control lists (ACLs) within the ksmbd module, potentially leading to memory management issues.

Vulnerability Detail

The vulnerability identified as CVE-2022-49366 arises from a reference count leak in the smb_check_perm_dacl() function of the ksmbd module. When both 'id' and 'uid' are equal, the function exits the loop prematurely without decrementing the reference count of the 'posix_acls' object, which was previously incremented by the get_acl() function. This oversight can lead to memory leaks, consuming system resources and potentially degrading performance over time.

How To Fix

Minimum fixed version

5.18.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade linux

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to apply the available patch as soon as possible.

Conclusion

CVE-2022-49366 represents a significant memory leak vulnerability in the Linux kernel's ksmbd module, which can lead to performance degradation. It is crucial to update to the patched version 5.18.5-1 or later to mitigate this risk. Regular monitoring and updates are essential to maintain system integrity.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2022-49366 is a vulnerability in the Linux kernel's ksmbd module that causes a memory leak due to improper reference counting in the smb_check_perm_dacl() function.

If exploited, this vulnerability can lead to increased memory usage, potentially affecting system performance and stability over time.

Versions of the Linux kernel prior to 5.18.5-1 are affected. You can check your version using the command 'uname -r'.

You can use Vulert, which monitors open-source vulnerabilities in your software by analyzing a manifest file like package-lock.json. It provides real-time alerts for any vulnerabilities detected.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by CVE-2022-49366 without needing to sign up.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

Minimum fixed version

5.18.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade linux

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback