Skip to contentSkip to conversation

cifs: add a warning that SMB 1.0 is deprecated and will be phased out in 12 months

PATCH New Ronnie Sahlberg 1 participant 1 message Jan 28, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: add a warning that SMB 1.0 is deprecated and will be phased out in 12 months

SMB1.0 was deprecated a long time ago.
The code is very old, fragile and has fragile bufferhandling.
There is no support or maintenacne of this dialect since a long time. Additionally, the protocol is much less rich than SMB2 and and has semantic differences which leads to unreasonable maintenance burdens.

Examples are: Rename ontop of an open file that has Delete-on-close set. Compounding support, encryption support.

Warn that this protocol version is deprecated and will be removed from cifs.ko in 12 months time.

---
 fs/cifs/fs_context.c | 1 +
 1 file changed, 1 insertion(+)
fs/cifs/fs_context.c +1 -0
index 7ec35f3f0a5f..80caddebdad8 100644
@@ -342,6 +342,7 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
 	switch (match_token(value, cifs_smb_version_tokens, args)) {
 #ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
 	case Smb_1:
+		cifs_errorf(fc, "WARNING: SMB1 is deprecated and will be removed from CIFS.KO in 2023. Please migrate to SMB2 or later.\n");
 		if (disable_legacy_dialects) {
 			cifs_errorf(fc, "mount with legacy dialect disabled\n");
 			return 1;
Signature · 1 line
2.30.2