linux/net/sunrpc/auth_gss
Jeff Layton cf4c024b90 sunrpc: trim off EC bytes in GSSAPI v2 unwrap
As Bruce points out in RFC 4121, section 4.2.3:

   "In Wrap tokens that provide for confidentiality, the first 16 octets
    of the Wrap token (the "header", as defined in section 4.2.6), SHALL
    be appended to the plaintext data before encryption.  Filler octets
    MAY be inserted between the plaintext data and the "header.""

...and...

   "In Wrap tokens with confidentiality, the EC field SHALL be used to
    encode the number of octets in the filler..."

It's possible for the client to stuff different data in that area on a
retransmission, which could make the checksum come out wrong in the DRC
code.

After decrypting the blob, we should trim off any extra count bytes in
addition to the checksum blob.

Reported-by: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2013-10-26 15:36:55 -04:00
..
auth_gss.c RPCSEC_GSS: fix crash on destroying gss auth 2013-09-18 10:18:44 -05:00
gss_generic_token.c net: return operator cleanup 2010-09-23 14:33:39 -07:00
gss_krb5_crypto.c SUNRPC: Don't use variable length automatic arrays in kernel code 2012-03-12 13:37:16 -04:00
gss_krb5_keys.c NFS: Don't use GFP_KERNEL in rpcsec_gss downcalls 2010-05-14 15:09:33 -04:00
gss_krb5_mech.c Merge branch 'nfs-for-next' of git://linux-nfs.org/~trondmy/nfs-2.6 into for-3.10 2013-04-29 16:23:34 -04:00
gss_krb5_seal.c SUNRPC: Fix a few sparse warnings 2012-03-11 19:30:02 -04:00
gss_krb5_seqnum.c net: return operator cleanup 2010-09-23 14:33:39 -07:00
gss_krb5_unseal.c gss_krb5: document that we ignore sequence number 2013-10-10 11:04:48 -04:00
gss_krb5_wrap.c sunrpc: trim off EC bytes in GSSAPI v2 unwrap 2013-10-26 15:36:55 -04:00
gss_mech_switch.c svcrpc: store gss mech in svc_cred 2013-07-01 17:23:06 -04:00
gss_rpc_upcall.c svcrpc: fix gss-proxy NULL dereference in some error cases 2013-10-08 15:56:15 -04:00
gss_rpc_upcall.h Merge branch 'nfs-for-next' of git://linux-nfs.org/~trondmy/nfs-2.6 into for-3.10 2013-04-29 16:23:34 -04:00
gss_rpc_xdr.c svcrpc: handle some gssproxy encoding errors 2013-10-10 11:04:47 -04:00
gss_rpc_xdr.h rpc: fix huge kmalloc's in gss-proxy 2013-09-06 11:45:58 -04:00
Makefile SUNRPC: Add RPC based upcall mechanism for RPCGSS auth 2013-04-26 11:41:27 -04:00
svcauth_gss.c svcrpc: fix error-handling on badd gssproxy downcall 2013-10-08 15:56:23 -04:00