lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <27143.1348134317@warthog.procyon.org.uk>
Date:	Thu, 20 Sep 2012 10:45:17 +0100
From:	David Howells <dhowells@...hat.com>
To:	James Morris <jmorris@...ei.org>
Cc:	dhowells@...hat.com, Alan Cox <alan@...rguk.ukuu.org.uk>,
	herbert@...dor.hengli.com.au, pjones@...hat.com,
	rusty@...tcorp.com.au, linux-crypto@...r.kernel.org,
	zohar@...ibm.com, dmitry.kasatkin@...el.com,
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/16] X.509: Add an ASN.1 decoder

James Morris <jmorris@...ei.org> wrote:

> I'd like to see some serious effort at code review and testing before this 
> code is merged.

With regard to testing, I've run multiple simultaneous instances of a number
of test scripts against it continuously for the best part of a day:

 (1) A script to generate completely random data and attempt to stuff that
     into a key.  The completely random data blob is fed wholly and then
     partially in decreasing amounts to keyctl padd.  Then the script loops
     and starts again.

	./fuzz-x509.sh /tmp/data1

 (2) A script to generate random valid ASN.1:

	while :; do ./asn1random.pl | keyctl padd asymmetric vlad @s; done

 (3) A script to generate correctly formatted X.509 certificates filled with
     random data, including for the RSA key and signature fields.

	while :; do ./x509random.pl | keyctl padd asymmetric vlad @s; done

 (4) A variant of (3) that injects random bytes into the structure, whilst
     correctly maintaining the length counts outside of those.

	while :; do ./x509random.pl -i | keyctl padd asymmetric vlad @s; done

 (5) A script to repeatedly generate valid X.509 certificates and stuff those
     in, and then generate valid PKCS#7 signatures over random data and try to
     stuff those in too (which should fail).

	./x509-stuffer.sh

David


View attachment "fuzz-x509.sh" of type "text/x-shellscript" (550 bytes)

View attachment "asn1random.pl" of type "text/x-perl" (2360 bytes)

View attachment "x509random.pl" of type "text/x-perl" (10702 bytes)

View attachment "x509-stuffer.sh" of type "text/x-shellscript" (894 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ