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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87628e5kve.fsf@rustcorp.com.au>
Date:	Mon, 20 Aug 2012 12:29:33 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Dmitry Kasatkin <dmitry.kasatkin@...el.com>,
	zohar@...ux.vnet.ibm.com, jmorris@...ei.org, dhowells@...hat.com,
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC v2 1/7] integrity: added digest calculation function

On Wed, 15 Aug 2012 21:43:06 +0300, Dmitry Kasatkin <dmitry.kasatkin@...el.com> wrote:
> +	} else {
> +		struct {
> +			struct shash_desc shash;
> +			char ctx[crypto_shash_descsize(tfm)];
> +		} desc;

Linus had a rant a while ago about using variable-sized stack vars in
the kernel (can't find a reference right now, sorry).

The problem is that either you know there's a limit to
crypto_shash_descsize(), in which case you can just use this here, or
you don't know, in which case, this risks a stack oveflow.

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ