Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef338bee authored by Kevin Coffman's avatar Kevin Coffman Committed by Trond Myklebust
Browse files

sunrpc: return error if unsupported enctype or cksumtype is encountered



Return an error from gss_import_sec_context_kerberos if the
negotiated context contains encryption or checksum types not
supported by the kernel code.

This fixes an Oops because success was assumed and later code found
no internal_ctx_id.

Signed-off-by: default avatarKevin Coffman <kwc@citi.umich.edu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ffc40f56
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -147,13 +147,17 @@ gss_import_sec_context_kerberos(const void *p,
	p = simple_get_bytes(p, end, &tmp, sizeof(tmp));
	if (IS_ERR(p))
		goto out_err_free_ctx;
	if (tmp != SGN_ALG_DES_MAC_MD5)
	if (tmp != SGN_ALG_DES_MAC_MD5) {
		p = ERR_PTR(-ENOSYS);
		goto out_err_free_ctx;
	}
	p = simple_get_bytes(p, end, &tmp, sizeof(tmp));
	if (IS_ERR(p))
		goto out_err_free_ctx;
	if (tmp != SEAL_ALG_DES)
	if (tmp != SEAL_ALG_DES) {
		p = ERR_PTR(-ENOSYS);
		goto out_err_free_ctx;
	}
	p = simple_get_bytes(p, end, &ctx->endtime, sizeof(ctx->endtime));
	if (IS_ERR(p))
		goto out_err_free_ctx;
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text,
	u32			seq_send;

	dprintk("RPC:       gss_krb5_seal\n");
	BUG_ON(ctx == NULL);

	now = get_seconds();