浏览代码

rxrpc: Use correct timestamp from Kerberos 5 ticket

When an XDR-encoded Kerberos 5 ticket is added as an rxrpc-type key, the
expiry time should be drawn from the k5 part of the token union (which was
what was filled in), rather than the kad part of the union.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
David Howells 8 年之前
父节点
当前提交
0a3785855e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/rxrpc/key.c

+ 1 - 1
net/rxrpc/key.c

@@ -536,7 +536,7 @@ static int rxrpc_preparse_xdr_rxk5(struct key_preparsed_payload *prep,
 	     pptoken = &(*pptoken)->next)
 		continue;
 	*pptoken = token;
-	expiry = rxrpc_u32_to_time64(token->kad->expiry);
+	expiry = rxrpc_u32_to_time64(token->k5->endtime);
 	if (expiry < prep->expiry)
 		prep->expiry = expiry;