netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] af_rxrpc: Fix XDR length check in rxrpc key demarshalling.
@ 2014-05-15 14:51 David Howells
  2014-05-15 14:52 ` David Howells
  2014-05-16 19:25 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: David Howells @ 2014-05-15 14:51 UTC (permalink / raw)
  To: netdev; +Cc: Nathaniel Wesley Filardo, linux-afs, linux-kernel

From: Nathaniel W Filardo <nwf@cs.jhu.edu>

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>
---

 net/rxrpc/ar-key.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
 	_debug("tktlen: %x", tktlen);
 	if (tktlen > AFSTOKEN_RK_TIX_MAX)
 		return -EKEYREJECTED;
-	if (8 * 4 + tktlen != toklen)
+	if (toklen < 8 * 4 + tktlen)
 		return -EKEYREJECTED;
 
 	plen = sizeof(*token) + sizeof(*token->kad) + tktlen;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] af_rxrpc: Fix XDR length check in rxrpc key demarshalling.
  2014-05-15 14:51 [PATCH] af_rxrpc: Fix XDR length check in rxrpc key demarshalling David Howells
@ 2014-05-15 14:52 ` David Howells
  2014-05-16 19:25 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2014-05-15 14:52 UTC (permalink / raw)
  To: netdev; +Cc: dhowells, Nathaniel Wesley Filardo, linux-afs, linux-kernel


This is aimed at the net tree.

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] af_rxrpc: Fix XDR length check in rxrpc key demarshalling.
  2014-05-15 14:51 [PATCH] af_rxrpc: Fix XDR length check in rxrpc key demarshalling David Howells
  2014-05-15 14:52 ` David Howells
@ 2014-05-16 19:25 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-05-16 19:25 UTC (permalink / raw)
  To: dhowells; +Cc: netdev, nwf, linux-afs, linux-kernel

From: David Howells <dhowells@redhat.com>
Date: Thu, 15 May 2014 15:51:22 +0100

> From: Nathaniel W Filardo <nwf@cs.jhu.edu>
> 
> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-16 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 14:51 [PATCH] af_rxrpc: Fix XDR length check in rxrpc key demarshalling David Howells
2014-05-15 14:52 ` David Howells
2014-05-16 19:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).