All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG 1/3] smb: client: SMB2/3 signature failures are logged but the response is accepted
@ 2026-07-19 18:05 Birtwhistle, Daniel
  2026-07-20  6:10 ` Willy Tarreau
  2026-07-20  6:13 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Birtwhistle, Daniel @ 2026-07-19 18:05 UTC (permalink / raw)
  To: Steve French
  Cc: Paulo Alcantara, linux-cifs@vger.kernel.org, security@kernel.org

Resending in plain text because the original copy was rejected by linux-cifs due to Outlook always wanting talk html; apologies for the duplicate to direct recipients...


Hello Steve, Paulo, and linux-cifs maintainers,

My name is Daniel Birtwhistle. In my role, I assess security properties of
software inherited by GE HealthCare products. I am writing personally as the
researcher and technical contact.

This is the first of three coordinated CIFS client reports. This message covers
response-signature enforcement. The companions cover server-provided symlinks
escaping mount confinement and client-required sealing being dropped after
reconnect; all three defects have different fixes and can be classified
independently.

Summary

On a signed SMB2/3 connection, smb2_check_receive() calls
smb2_verify_signature() and logs a verification error, but then returns only
the server-provided SMB status. A response with a bad signature can therefore
be consumed as successful on this synchronous receive path.

Current source

I rechecked upstream commit
980ab36ae5972c83f683b939e50c469c4947229e from 2026-07-19.
fs/smb/client/smb2transport.c:694-716 still has this sequence:

    rc = smb2_verify_signature(&rqst, server);
    if (rc)
        cifs_server_dbg(...);
    ...
    return map_smb2_to_linux_error(mid->resp_buf, log_error);

The verification rc does not reach the caller. All current SMB2, SMB2.1,
SMB3.0 and SMB3.1.1 operation tables select smb2_check_receive.

Runtime confirmation

I confirmed the behavior on SLES 15 SP6 kernel
6.4.0-150600.23.60-default in a controlled reconnect test. The replacement
SMB endpoint did not know the password, NT hash or real session key. The
client logged repeated signature verification failures with -EACCES, including
for TREE_CONNECT and later synchronous commands, but TREE_CONNECT returned
success and the client consumed the subsequent responses. A harmless synthetic
canary demonstrated the resulting path; no production system or data was used.

The result is not dependent on the separate symlink classification: accepting
a successful response after its required signature failed verification is the
integrity failure. The companion report provides one concrete downstream
consequence.

History and fix direction

The path originates in 3c1bf7e48e9e ("CIFS: Enable signing in SMB2"). Commit
dc96f01d54cc in v7.0-rc1 described the same log-without-action behavior and
added enforcement to the SMB1 receive path, but it did not change
smb2_check_receive(). Commit 2c1238a7477a changed read/write callback behavior,
but the synchronous path above remains.

The expected correction appears to be propagating the signature-verification
error rather than mapping or consuming the untrusted response status. A stable
backport would be needed for affected maintained branches.

I built and differentially tested that minimal candidate against maintained
7.1.3+deb14-arm64. A real Samba mandatory-signing control mounted and read
normally. After replacement authentication without the real password, every
bad-signed TREE_CONNECT returned -EACCES and twenty bounded reads failed; the
canary was never returned. The candidate deliberately does not force reconnect
from smb2_check_receive(); it returns the verification failure and leaves
transport-lifecycle policy to the existing caller paths.

I have the minimal candidate patch, source harness, raw transcript, trace
results and matched controls. I have not posted or attached the reproducer,
but can provide it directly for review and can test a maintainer-proposed fix.

Requested credit, if useful: Daniel Birtwhistle



Best Regards,

Daniel Birtwhistle
Senior Director Product Security & Assessment 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-20 11:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 18:05 [BUG 1/3] smb: client: SMB2/3 signature failures are logged but the response is accepted Birtwhistle, Daniel
2026-07-20  6:10 ` Willy Tarreau
2026-07-20  6:13 ` Greg KH
2026-07-20 11:51   ` Birtwhistle, Daniel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.