Project

General

Profile

Actions

Bug #15214

closed

SMB should allow 256 bit ciphers

Added by Toomas Soome over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
smb - SMB server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
racktop:BSR-8441

Description

Testing: Change the default SMB cipher from "all" to "aes256-ccm,aes256-gcm"
using "sharectl set -p encrypt_ciphers=... smb"
and verify changed results of the WPTS encryption tests.

Alternatively try "aes128-ccm,aes128-gcm", or just "all"

Run the Windows Protocol Test Suites (WPTS)

Should also check that performance with aes256-gcm is at least as good as aes128-gcm
A simple "large file copy" in/out of the SMB share may be good enough for that,
repeated with each encrypt_ciphers setting.
Remember to restart the SMB service after the encrypt_ciphers changes, because
new settings apply only to client connections made after the change.

This change does some rework of #14047
Actually, this was meant to go in under that issue. Oh well.

Testing done: Used WPTS. With

sharectl set -p encrypt_ciphers=aes256-ccm,aes256-gcm smb

We do get:

BVT_Encryption_SMB311_AES_256_CCM    Passed
BVT_Encryption_SMB311_AES_256_GCM    Passed
BVT_Encryption_SMB311_CCM    Failed
BVT_Encryption_SMB311_GCM    Failed
...
BVT_Negotiate_SMB311_Preauthentication_Encryption_AES_256_CCM    Passed
BVT_Negotiate_SMB311_Preauthentication_Encryption_AES_256_GCM    Passed
BVT_Negotiate_SMB311_Preauthentication_Encryption_CCM    Failed
BVT_Negotiate_SMB311_Preauthentication_Encryption_GCM    Failed

Failures above are present because we did limit the chiphers.

However, setting:

sharectl set -p encrypt_ciphers=all smb

We do get:

BVT_Encryption_SMB311_AES_256_CCM    Passed
BVT_Encryption_SMB311_AES_256_GCM    Passed
BVT_Encryption_SMB311_CCM    Passed
BVT_Encryption_SMB311_GCM    Passed
...
BVT_Negotiate_SMB311_Preauthentication_Encryption_AES_256_CCM    Passed
BVT_Negotiate_SMB311_Preauthentication_Encryption_AES_256_GCM    Passed
BVT_Negotiate_SMB311_Preauthentication_Encryption_CCM    Passed
BVT_Negotiate_SMB311_Preauthentication_Encryption_GCM    Passed

The file copy test is showing about the same numbers for both 128 bit and 256 bit variants, if anything, then 256 bit variant seems a bit faster on this hardware.


Related issues

Related to illumos gate - Feature #14047: Add support for SMB 3.1.1 AES-256ClosedAlexander Stetsenko

Actions
Actions #1

Updated by Electric Monk over 1 year ago

  • Gerrit CR set to 2534
Actions #2

Updated by Gordon Ross over 1 year ago

  • Description updated (diff)
Actions #3

Updated by Gordon Ross over 1 year ago

Actions #4

Updated by Gordon Ross over 1 year ago

  • Description updated (diff)
Actions #5

Updated by Toomas Soome over 1 year ago

  • Status changed from In Progress to Pending RTI
Actions #6

Updated by Gordon Ross over 1 year ago

Additional test steps recommended:

Run basic sanity test for each of the encryption modes, by doing some basic operations on a share with encryption set to 'required':
3.0/3.0.2 support - Windows 2012, or set max_protocol to 3.02
3.1.1, with each of aes128-gcm and aes128-ccm - Windows 10 or 11
3.1.1, with each of aes256-gcm and aes256-gcm - Windows 11

You can use 'sharectl set -p encrypt_cipher=aes128-ccm' to force clients to negotiate aes128-ccm, and similarly for the other ciphers. This issue requires authenticating with Kerberos (domain joined, using FQDN, so the authentication session key is longer); you may want to repeat this testing with NTLM (ip address) as well.

Actions #7

Updated by Toomas Soome about 1 year ago

  • Description updated (diff)
Actions #8

Updated by Toomas Soome about 1 year ago

  • Description updated (diff)
Actions #9

Updated by Electric Monk about 1 year ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit a4568e19224dbd8e405999c57ff8d4e4fd0d877f

commit  a4568e19224dbd8e405999c57ff8d4e4fd0d877f
Author: Alexander Stetsenko <alex.stetsenko@gmail.com>
Date:   2023-03-15T09:52:33.000Z

    15214 SMB should allow 256 bit ciphers
    14047 Add support for SMB 3.1.1 AES-256
    Portions contributed by: Matt Barden <mbarden@racktopsystems.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Gordon Ross <gwr@racktopsystems.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF