All reports
Low

kernel: cifs: parse_dfs_referrals: prevent oob on malformed input

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2025-40099

Probability of exploitation in the next 30 days: 0.41%

FIRST EPSS · 2026-11-22

Description

In the Linux kernel, the following vulnerability has been resolved: cifs: parse_dfs_referrals: prevent oob on malformed input Malicious SMB server can send invalid reply to FSCTL_DFS_GET_REFERRALS

  • reply smaller than sizeof(struct get_dfs_referral_rsp)

  • reply with number of referrals smaller than NumberOfReferrals in the header Processing of such replies will cause oob. Return -EINVAL error on such replies to prevent oob-s.

A flaw was found in the Linux kernel's CIFS/SMB client implementation. In parse_dfs_referrals(), insufficient validation of server responses to FSCTL_DFS_GET_REFERRALS requests allows a malicious SMB server to send crafted replies that cause out-of-bounds memory access. Specifically, replies smaller than expected or with mismatched referral counts can trigger the vulnerability. A system connecting to a malicious or compromised SMB server could experience a kernel crash or memory corruption.