KernelScan.io

HIGH

ksmbd MAC Timing

CVE-2026-23364

CVSS 7.4 / 10.0 NVD

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

KernelScan AI5.9MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: ksmbd: Compare MACs in constant time To prevent timing attacks, MAC comparisons need to be constant-time. Replace the memcmp() with the correct function, crypto_memneq().

02

Engine v0.2.0

Risk summary

Remote attackers can exploit timing differences in MAC verification to potentially extract authentication secrets from ksmbd SMB servers. This affects systems running the in-kernel SMB server with network exposure. The attack requires sophisticated timing analysis but no authentication.

Affectedfs/smb/server/auth.c (ksmbd)

Vulnerability analysis

The vulnerability exists in ksmbd's authentication and signature verification code where memcmp() is used to compare cryptographic MACs (Message Authentication Codes). The memcmp() function performs byte-by-byte comparison and returns early on the first mismatch, creating measurable timing differences that leak information about the secret MAC values. The fix replaces memcmp() with crypto_memneq(), which performs constant-time comparison regardless of where differences occur, preventing timing-based side-channel attacks. This affects both NTLMv2 authentication in auth.c and SMB2/SMB3 signature verification in smb2pdu.c.

03

BranchFixed inPatch commit
6.16.1.167cd52a0e30965
6.126.12.782cdc56ed6761
6.186.18.1993c0a22fec91
6.196.19.7f4588b85efd6
6.66.6.130307afccb751f
mainline7.0c5794709bc91