kernel BUG at crypto/scatterwalk.c:37! when using modified tcrypt for HMAC testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to test AEAD based HMAC (sha1-96) with NULL encryption using a 
modified tcrypt module.

I'm using a 2.6.27.4 kernel on an armv5te platform.

I hit a BUG() at crypto/scatterwalk.c:37 that indicates that the scatterlist 
length is zero.

I've traced this back to crypto/authenc.c function crypto_authenc_genicv()...

There is a call to authenc_chain(cipher, dst, vdst == iv + ivsize);

It seems the test vdst == iv + ivsize fails. Does anyone know the purpose of 
the test ? I think it is trying to check that the end of the IV field matches 
something in the reg->dst scatterlist ?

authenc_chain() is...

static void authenc_chain(struct scatterlist *head, struct scatterlist *sg,
			  int chain)
{
	if (chain) {
		head->length += sg->length;
		sg = scatterwalk_sg_next(sg);
	}

	if (sg)
		scatterwalk_sg_chain(head, 2, sg);
	else
		sg_mark_end(head);
}

Therefore the value of chain is 0 and this causes authenc_chain() to not 
update the length in head eg. chiper[0] scatterlist.

Can anyone please tell me what authenc_chain() is trying to do ?

Is there a "special" relationship to create the IV buffer with respect to the 
dst scatterlist within tcrypt so that chain = 1 ? If I use ESP4 in IPsec 
instead of tcrypt, then chain does equal 1.

Thanks for any info ?

Regards,

Dean Jenkins
MontaVista Software

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux