From patchwork Fri Feb 28 07:37:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11411637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE31C14B7 for ; Fri, 28 Feb 2020 07:37:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDF55246A8 for ; Fri, 28 Feb 2020 07:37:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XrUzCYst" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbgB1Hhw (ORCPT ); Fri, 28 Feb 2020 02:37:52 -0500 Received: from mail-il1-f172.google.com ([209.85.166.172]:36399 "EHLO mail-il1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgB1Hhw (ORCPT ); Fri, 28 Feb 2020 02:37:52 -0500 Received: by mail-il1-f172.google.com with SMTP id b15so1941992iln.3 for ; Thu, 27 Feb 2020 23:37:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vZQ4talGgQI8D4R1iExDotvUYjS2fG1VjucQIRpKGBY=; b=XrUzCYstOfYMGCG6ykazloS4kNlIrJLoawezZUlD6bo+Nao4N3RdzWiuWtIFK5Jn0B F2+8HbeQoOLZ8rEzCMu4cjFMpqGfdoGgfHM+oOGPWls8Yezar+gLIo2zjREeX/3eXxmS 4kfmI0azn+g0emC3E/xEX8WlTv+ea41EnOr6JjtNsvy3qxW8XBLR0ipuPDmOT9nWCwh1 0xNOem1jpvUg3og9Wf4M1uQEdNXN8MeOusPrhyFfrtL6rYBqxIeBDlJ1Nq6fm8xfeiP2 2DBW2+f2vU5X9dPraDDfYY+rY9aCfPCl3xj7swvHLpw8MyXskXN8IfVaEh2M56vjJgFd mN2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vZQ4talGgQI8D4R1iExDotvUYjS2fG1VjucQIRpKGBY=; b=PsQF1NtOwCLe/zyw6jKDxc1PhpErWRSWXbeyzFkj/UDcp3F4wMkL8VQjOnPa61OeEi VZRwHLBnDhdm2Ws7f5FFhpt0b16sfLlgTNnl0phKbFX4TFMQIMw902F8sDF5lFAqjCv0 3hLRsVDmiVp9Aq7JX+nuwF9M7m2FiXyzyXagLkKkZYXJJOmusj1elF8N1wS5sc4NzCbv 8A/I78/JpyGUsmrzoXTvl4Ctfpog8DpYKspEYNQcUIAA802vUipYWjwfnw4jTrzZ1H+M hTmqM4v5CjJitP9wdeMmNr9RDzA0zax+EUSVtH80lkooO5TWSJOu+H9fMOTS10ShT1nu t+2g== X-Gm-Message-State: APjAAAW6JLcu5kJHDIEPTBVkK9gW7YS6Gzmcwc6zveJUn7vP0GaLeLT5 nBvixSp2mDnbiUdBB6mvvCBQkNTR3lhp3XzD+3KDdApK X-Google-Smtp-Source: APXvYqwaF3AZbCUz6N3VthQSheiHXJ1nIzflxbnICKiY8i/MJm/+ISpXAI4c8csDGdAtX3RyCnkwbuw6pYj4kK1qvwo= X-Received: by 2002:a92:d642:: with SMTP id x2mr3147241ilp.169.1582875470998; Thu, 27 Feb 2020 23:37:50 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Fri, 28 Feb 2020 01:37:40 -0600 Message-ID: Subject: [CIFS][PATCH] print warning once if mounting with vers=1.0 To: CIFS Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org We really, really don't want people using insecure dialects unless they realize what they are doing ... Add print once warning if mounting with vers=1.0 (older SMB1/CIFS dialect) instead of the default (SMB2.1 or later, typically SMB3.1.1). From a413f3274d270209f9f623bca301dbb8a772df63 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 28 Feb 2020 01:32:37 -0600 Subject: [PATCH] cifs: print warning once if mounting with vers=1.0 We really, really don't want people using insecure dialects unless they realize what they are doing ... Add print once warning if mounting with vers=1.0 (older SMB1/CIFS dialect) instead of the default (SMB2.1 or later, typically SMB3.1.1). Signed-off-by: Steve French --- fs/cifs/connect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index f4d12b79ceed..27577d71d942 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1471,6 +1471,9 @@ cifs_parse_smb_version(char *value, struct smb_vol *vol, bool is_smb3) cifs_dbg(VFS, "vers=1.0 (cifs) not permitted when mounting with smb3\n"); return 1; } + printk_once(KERN_WARNING "Use of the less secure dialect " + "vers=1.0 is not recommended unless required for " + "access to very old servers\n"); vol->ops = &smb1_operations; vol->vals = &smb1_values; break; -- 2.20.1