spkm3 removal
Subsystems (3)
Shall we go ahead and remove this?
Somebody stumbled across a security problem in the spkm3 code recently--unexploitable, as far as I can tell, since you'd need an spkm3 context first, and those are hard to come by.... But I feel a little bad leaving this code around for innocent bystanders to waste their time auditing.
The only remaining references I find:
bfields@pepper:linux-2.6$ git grep -i spkm3 arch/arm/configs/pnx4008_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/mips/configs/bcm47xx_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/mips/configs/bigsur_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/mips/configs/jazz_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/mips/configs/mtx1_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/mips/configs/rm200_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/parisc/configs/712_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/parisc/configs/a500_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/parisc/configs/default_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/powerpc/configs/c2k_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/powerpc/configs/iseries_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/powerpc/configs/ppc64_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/powerpc/configs/ppc64e_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/powerpc/configs/ppc6xx_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/powerpc/configs/pseries_defconfig:CONFIG_RPCSEC_GSS_SPKM3=m arch/xtensa/configs/common_defconfig:# CONFIG_RPCSEC_GSS_SPKM3 is not set
No idea what to do about those.
fs/nfs/super.c: { Opt_sec_spkm, "spkm3" },fs/nfs/super.c: { Opt_sec_spkmi, "spkm3i" },fs/nfs/super.c: { Opt_sec_spkmp, "spkm3p" },
Should those mount options be removed to? They could be done in a followup patch, I guess.
And then there's a couple comments.
There's also a bunch of glue code we could remove later if we assume there's only one gss mechanism--but I'd rather leave that in.
--b.
commit a069e192e1e396d5a80add73c30bc43a0f7353f1
Author: J. Bruce Fields <[email protected]> Date: Fri Oct 1 15:40:01 2010 -0400
nfsd4: remove spkm3
Unfortunately, spkm3 never got very far; while interoperability with one other implementation was demonstrated at some point, problems were found with the spec that were deemed not worth fixing.
The kernel code is useless on its own without nfs-utils patches which were never merged into nfs-utils, and were only ever available from citi.umich.edu. They appear not to have been updated since 2005.
Therefore it seems safe to assume that this code has no users, and never will.
include/linux/sunrpc/gss_spkm3.h deleted +0 -55
@@ -1,55 +0,0 @@ -/* -* linux/include/linux/sunrpc/gss_spkm3.h -* -* Copyright (c) 2000 The Regents of the University of Michigan. -* All rights reserved. -* -* Andy Adamson <[email protected]> -*/ - -#include <linux/sunrpc/auth_gss.h> -#include <linux/sunrpc/gss_err.h> -#include <linux/sunrpc/gss_asn1.h> - -struct spkm3_ctx { -struct xdr_netobj ctx_id;/* per message context id */ -int endtime;/* endtime of the context */ -struct xdr_netobj mech_used; -unsigned int ret_flags ; -struct xdr_netobj conf_alg; -struct xdr_netobj derived_conf_key; -struct xdr_netobj intg_alg; -struct xdr_netobj derived_integ_key; -}; - -/* OIDs declarations for K-ALG, I-ALG, C-ALG, and OWF-ALG */ -extern const struct xdr_netobj hmac_md5_oid; -extern const struct xdr_netobj cast5_cbc_oid; - -/* SPKM InnerContext Token types */ - -#define SPKM_ERROR_TOK 3 -#define SPKM_MIC_TOK 4 -#define SPKM_WRAP_TOK 5 -#define SPKM_DEL_TOK 6 - -u32 spkm3_make_token (struct spkm3_ctx *ctx,struct xdr_buf * text,struct xdr_netobj * token,int toktype); - -u32 spkm3_read_token (struct spkm3_ctx *ctx,struct xdr_netobj *read_token,struct xdr_buf *message_buffer,int toktype); - -#define CKSUMTYPE_RSA_MD5 0x0007 -#define CKSUMTYPE_HMAC_MD5 0x0008 - -s32 make_spkm3_checksum (s32 cksumtype,struct xdr_netobj *key,char *header, -unsigned int hdrlen,struct xdr_buf *body, -unsigned int body_offset,struct xdr_netobj *cksum); -void asn1_bitstring_len (struct xdr_netobj *in,int *enclen,int *zerobits); -int decode_asn1_bitstring (struct xdr_netobj *out,char *in,int enclen, -int explen); -void spkm3_mic_header (unsigned char **hdrbuf,unsigned int *hdrlen, -unsigned char *ctxhdr,int elen,int zbit); -void spkm3_make_mic_token (unsigned char **tokp,int toklen, -struct xdr_netobj *mic_hdr, -struct xdr_netobj *md5cksum,int md5elen,int md5zbit); -u32 spkm3_verify_mic_token (unsigned char **tokp,int *mic_hdrlen, -unsigned char **cksum);
net/sunrpc/Kconfig +0 -19
@@ -36,22 +36,3 @@ config RPCSEC_GSS_KRB5 Kerberos support should be installed. If unsure, say Y. - -config RPCSEC_GSS_SPKM3 - tristate "Secure RPC: SPKM3 mechanism (EXPERIMENTAL)" - depends on SUNRPC && EXPERIMENTAL - select SUNRPC_GSS - select CRYPTO - select CRYPTO_MD5 - select CRYPTO_DES - select CRYPTO_CAST5 - select CRYPTO_CBC - help - Choose Y here to enable Secure RPC using the SPKM3 public key - GSS-API mechanism (RFC 2025). - - Secure RPC calls with SPKM3 require an auxiliary userspace - daemon which may be found in the Linux nfs-utils package - available from http://linux-nfs.org/. - - If unsure, say N.
net/sunrpc/auth_gss/Makefile +0 -5
@@ -11,8 +11,3 @@ obj-$(CONFIG_RPCSEC_GSS_KRB5) += rpcsec_gss_krb5.o rpcsec_gss_krb5-objs := gss_krb5_mech.o gss_krb5_seal.o gss_krb5_unseal.o \ gss_krb5_seqnum.o gss_krb5_wrap.o gss_krb5_crypto.o gss_krb5_keys.o - -obj-$(CONFIG_RPCSEC_GSS_SPKM3) += rpcsec_gss_spkm3.o - -rpcsec_gss_spkm3-objs := gss_spkm3_mech.o gss_spkm3_seal.o gss_spkm3_unseal.o \ - gss_spkm3_token.o
net/sunrpc/auth_gss/gss_spkm3_mech.c deleted +0 -247
247 lines not on this page · raw message
net/sunrpc/auth_gss/gss_spkm3_seal.c deleted +0 -186
186 lines not on this page · raw message
net/sunrpc/auth_gss/gss_spkm3_token.c deleted +0 -267
267 lines not on this page · raw message
net/sunrpc/auth_gss/gss_spkm3_unseal.c deleted +0 -127
127 lines not on this page · raw message
Quoted 7 lines · J. Bruce Fields
Shall we go ahead and remove this?
Somebody stumbled across a security problem in the spkm3 code recently--unexploitable, as far as I can tell, since you'd need an spkm3 context first, and those are hard to come by.... But I feel a little bad leaving this code around for innocent bystanders to waste their time auditing.
Agreed. Let's get rid of it.
Cheers
Trond
Quoted 10 lines · Trond Myklebust
Quoted 7 lines · J. Bruce Fields
Shall we go ahead and remove this?
Somebody stumbled across a security problem in the spkm3 code recently--unexploitable, as far as I can tell, since you'd need an spkm3 context first, and those are hard to come by.... But I feel a little bad leaving this code around for innocent bystanders to waste their time auditing.
Agreed. Let's get rid of it.
OK, I'll give it a little more time in case anyone wants to make a case for spkm3, then queue it up for 2.6.37--and maybe adding it to -next will get me some email telling me what I should have done about the defconfigs....
--b.