Junglewise Threat Intelligence

CVE-2026-31610: Linux Kernel ksmbd memory leak in SPNEGO token decoding

CVE-2026-31610 · Severity: medium · CVSS 5.5 · Published 2026-04-24

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's SMB server (ksmbd) allows unauthenticated remote users to cause a memory leak. By sending specially crafted network packets during the initial connection phase, an attacker can exhaust system memory over time. This can eventually lead to a system slowdown or a complete service outage.

Technical details

A memory leak exists in the ksmbd component of the Linux kernel due to improper handling of SPNEGO tokens during the ASN.1 BER decoding process. When ksmbd_decode_negTokenInit() processes a mechToken, it allocates memory immediately; however, if subsequent elements in the same blob are malformed, the decoder returns an error and sets a flag that causes the cleanup routine to skip the necessary kfree() call. This path is reachable pre-authentication, allowing a remote attacker to trigger incremental memory exhaustion. The fix removes the conditional check that prevented the memory from being freed and adds a fallback free in ksmbd_conn_free().

Affected products

  • Linux Linux kernel 5.15 to 7.0.1

Timeline

  • 2026-04-24: advisory: Initial disclosure date
  • 2026-04-06: patched: Patch authored by Greg Kroah-Hartman

References

Related threats