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]
Date:	Sun, 23 Jan 2011 18:56:46 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	linux-crypto@...r.kernel.org, tadeusz.struk@...el.com,
	linux-kernel@...r.kernel.org, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"David S. Miller" <davem@...emloft.net>,
	Huang Ying <ying.huang@...el.com>,
	Adrian Hoban <adrian.hoban@...el.com>,
	Gabriele Paoloni <gabriele.paoloni@...el.com>,
	aidan.o.mahony@...el.com
Subject: Re: [PATCH] rfc4106, Intel, AES-NI: Don't leak memory in
	rfc4106_set_hash_subkey().

On Sun, Jan 16, 2011 at 03:38:47PM +0100, Jesper Juhl wrote:
> There's a small memory leak in 
> arch/x86/crypto/aesni-intel_glue.c::rfc4106_set_hash_subkey(). If the call 
> to kmalloc() fails and returns NULL then the memory allocated previously 
> by ablkcipher_request_alloc() is not freed when we leave the function.
> 
> I could have just added a call to ablkcipher_request_free() before we 
> return -ENOMEM, but that started to look too much like the code we 
> already had at the end of the function, so I chose instead to rework the 
> code a bit so that there are now a few labels at the end that we goto when 
> various allocations fail, so we don't have to repeat the same blocks of 
> code (this also reduces the object code size slightly).
> 
> Please review and consider merging.
> 
> Signed-off-by: Jesper Juhl <jj@...osbits.net>

Patch applied.  Thanks a lot!
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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