Commit 71c02863 authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French
Browse files

cifs: fork arc4 and create a separate module for it for cifs and other users



We can not drop ARC4 and basically destroy CIFS connectivity for
almost all CIFS users so create a new forked ARC4 module that CIFS and other
subsystems that have a hard dependency on ARC4 can use.

Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 76a3c92e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -358,7 +358,14 @@ config NFS_V4_2_SSC_HELPER

source "net/sunrpc/Kconfig"
source "fs/ceph/Kconfig"

source "fs/cifs/Kconfig"

config CIFS_COMMON
	tristate
	default y if CIFS=y
	default m if CIFS=m

source "fs/coda/Kconfig"
source "fs/afs/Kconfig"
source "fs/9p/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ obj-$(CONFIG_LOCKD) += lockd/
obj-$(CONFIG_NLS)		+= nls/
obj-$(CONFIG_UNICODE)		+= unicode/
obj-$(CONFIG_SYSV_FS)		+= sysv/
obj-$(CONFIG_CIFS_COMMON)	+= cifs_common/
obj-$(CONFIG_CIFS)		+= cifs/
obj-$(CONFIG_HPFS_FS)		+= hpfs/
obj-$(CONFIG_NTFS_FS)		+= ntfs/
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ config CIFS
	select CRYPTO_SHA512
	select CRYPTO_CMAC
	select CRYPTO_HMAC
	select CRYPTO_LIB_ARC4
	select CRYPTO_AEAD2
	select CRYPTO_CCM
	select CRYPTO_GCM
+4 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#include <linux/random.h>
#include <linux/highmem.h>
#include <linux/fips.h>
#include <crypto/arc4.h>
#include "../cifs_common/arc4.h"
#include <crypto/aead.h>

int __cifs_calc_signature(struct smb_rqst *rqst,
@@ -699,8 +699,8 @@ calc_seckey(struct cifs_ses *ses)
		return -ENOMEM;
	}

	arc4_setkey(ctx_arc4, ses->auth_key.response, CIFS_SESS_KEY_SIZE);
	arc4_crypt(ctx_arc4, ses->ntlmssp->ciphertext, sec_key,
	cifs_arc4_setkey(ctx_arc4, ses->auth_key.response, CIFS_SESS_KEY_SIZE);
	cifs_arc4_crypt(ctx_arc4, ses->ntlmssp->ciphertext, sec_key,
			CIFS_CPHTXT_SIZE);

	/* make secondary_key/nonce as session key */
+6 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
#
# Makefile for Linux filesystem routines that are shared by client and server.
#

obj-$(CONFIG_CIFS_COMMON) += cifs_arc4.o
Loading