Cloudanix VulnDB

CVE-2025-22041

High · 8.8

CVSS

8.8

EPSS

0.7%

Published

Apr 16, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in the Linux kernel's file-sharing code can let attackers who already have login access take over affected computers.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Full Compromise
Component
OS kernel
Class
Use After Free
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Use-after-free in ksmbd_sessions_deregister() during multichannel SMB session setup, where a session freed via the global table remains accessible through the connection's sessions list.

Why it matters to the business

Remote attackers with valid SMB credentials can achieve arbitrary code execution on affected enterprise Linux systems, risking data theft, ransomware deployment, or full host compromise; high prevalence in Red Hat environments increases exposure for organizations running unpatched kernels.

How an attack unfolds

An attacker establishes an SMB multichannel connection, registers a session on the first channel, then triggers deregistration while the second channel still references the freed session object through the connection structure, leading to memory corruption and potential control-flow hijacking.

How to fix it

Upgrade all listed affected packages to version 0:4.18.0-372.129.1.el8_6 or later; apply the vendor kernel update immediately and reboot systems; disable ksmbd if multichannel SMB is not required.

How to confirm the fix worked

Verify installed kernel version matches or exceeds 4.18.0-372.129.1.el8_6; review kernel changelog for the ksmbd_sessions_deregister fix; test multichannel session teardown under load in a lab environment.

Typical attack path

  1. Obtain valid low-privileged SMB credentials on the target
  2. Initiate multichannel SMB session negotiation
  3. Register session via first channel and trigger concurrent deregistration
  4. Access dangling session pointer via second channel's connection list
  5. Trigger use-after-free to corrupt kernel memory and execute payload

How to detect it

Search kernel logs and audit trails for ksmbd session registration/deregistration errors or crashes around multichannel SMB activity; correlate with unexpected process terminations or memory corruption indicators in dmesg.

What your security team should do

  • Apply the fixed kernel packages within 30 days given the high CVSS and enterprise exposure
  • Restrict SMB access to trusted networks and enforce strong authentication
  • Monitor for unusual ksmbd session activity in system logs
  • Plan phased rollout and kernel compatibility testing for production workloads

The record

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in ksmbd_sessions_deregister() In multichannel mode, UAF issue can occur in session_deregister when the second channel sets up a session through the connection of the first channel. session that is freed through the global session table can be accessed again through ->sessions of connection.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:11 linux-6.1 0 6.1.137-1~deb11u1
Debian:12 linux 0 No fix
Debian:13 linux 0 No fix
Debian:13 linux 0 6.12.25-1
Linux Kernel 5.15.0 6.1.134
Mageia:9 kernel 0 6.6.88-3.mga9
Mageia:9 kernel-linus 0 6.6.88-1.mga9
Mageia:9 kmod-virtualbox 0 7.0.24-70.mga9
Mageia:9 kmod-xtables-addons 0 3.24-78.mga9

Related vulnerabilities