Cloudanix VulnDB

CVE-2025-38191

None

CVSS

—

EPSS

1.4%

Published

Jul 4, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in the Linux kernel's file sharing component can make systems crash when certain login attempts occur, requiring prompt software updates to prevent service outages.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Low
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

Null pointer dereference in ksmbd destroy_previous_session when PreviousSessionId is supplied during Kerberos session setup before sess->user is initialized in ksmbd_krb5_authenticate.

Why it matters to the business

Linux systems running ksmbd may crash during SMB authentication attempts, causing denial of service for file sharing services; high prevalence in container images amplifies operational risk across deployments.

How an attack unfolds

An attacker initiates a Kerberos-authenticated SMB session setup supplying a PreviousSessionId value; because authentication has not yet populated sess->user, the call to destroy_previous_session passes NULL and triggers the dereference, leading to a kernel panic or potential further memory corruption.

How to fix it

Upgrade the Linux kernel to a version containing commit 281afc52e2961cd5dd8326ebc9c5bc40904c0468 or later; for affected container packages apply the listed fixed versions such as 25.6.2-r0 for linkerd2 variants.

How to confirm the fix worked

Confirm the patch is present by checking kernel source for the reordered ksmbd_krb5_authenticate call before destroy_previous_session, or verify package versions match the fixed releases provided.

Typical attack path

  1. Connect to ksmbd and begin SMB2 session setup using Kerberos
  2. Include a non-zero PreviousSessionId field before authentication completes
  3. Trigger the premature destroy_previous_session call resulting in NULL dereference

How to detect it

Review kernel logs for oops or panic messages referencing destroy_previous_session or ksmbd during SMB session setup; correlate with network traffic showing Kerberos-authenticated session requests containing PreviousSessionId.

What your security team should do

  • Prioritize kernel and package upgrades on all systems exposing ksmbd
  • Monitor EPSS trend and threat actor activity for any increase in targeting
  • Temporarily disable ksmbd or restrict SMB access if immediate patching is not feasible

The record

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix null pointer dereference in destroy_previous_session If client set ->PreviousSessionId on kerberos session setup stage, NULL pointer dereference error will happen. Since sess->user is not set yet, It can pass the user argument as NULL to destroy_previous_session. sess->user will be set in ksmbd_krb5_authenticate(). So this patch move calling destroy_previous_session() after ksmbd_krb5_authenticate().

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:12 linux 0 No fix
Debian:13 linux 0 No fix
Debian:14 linux 0 6.12.35-1
Linux Kernel 5.15.0 6.1.142
Mageia:9 kernel 0 6.6.101-1.mga9
Mageia:9 kernel-linus 0 6.6.101-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.10-7.mga9
Mageia:9 kmod-xtables-addons 0 3.24-83.mga9
Mageia:9 wireless-regdb 0 20250710-1.mga9

Related vulnerabilities