aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNathaniel W Filardo <nwf@cs.jhu.edu>2014-05-15 10:51:22 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-16 15:24:47 -0400
commitfde0133b9cfa4e01b275e942ffc32fd78e27d27c (patch)
treeddb95ce510f1d4f1920ba80a77bead614e62a874 /net
parent6e14a5eeb158215881ef4507833a3574d0dbad19 (diff)
af_rxrpc: Fix XDR length check in rxrpc key demarshalling.
There may be padding on the ticket contained in the key payload, so just ensure that the claimed token length is large enough, rather than exactly the right size. Signed-off-by: Nathaniel Wesley Filardo <nwf@cs.jhu.edu> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/rxrpc/ar-key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c
index 7633a752c65e..0ad080790a32 100644
--- a/net/rxrpc/ar-key.c
+++ b/net/rxrpc/ar-key.c
@@ -99,7 +99,7 @@ static int rxrpc_instantiate_xdr_rxkad(struct key *key, const __be32 *xdr,
99 _debug("tktlen: %x", tktlen); 99 _debug("tktlen: %x", tktlen);
100 if (tktlen > AFSTOKEN_RK_TIX_MAX) 100 if (tktlen > AFSTOKEN_RK_TIX_MAX)
101 return -EKEYREJECTED; 101 return -EKEYREJECTED;
102 if (8 * 4 + tktlen != toklen) 102 if (toklen < 8 * 4 + tktlen)
103 return -EKEYREJECTED; 103 return -EKEYREJECTED;
104 104
105 plen = sizeof(*token) + sizeof(*token->kad) + tktlen; 105 plen = sizeof(*token) + sizeof(*token->kad) + tktlen;