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
| ||
|
Date: Thu, 18 Feb 2016 06:35:46 +0100 From: Rasmus Villemoes <linux@...musvillemoes.dk> To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org> Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-kernel@...r.kernel.org Subject: Re: [PATCH] nvmem: core: fix error path in nvmem_add_cells() On Wed, Feb 17 2016, Srinivas Kandagatla <srinivas.kandagatla@...aro.org> wrote: >> err: >> - while (--i) >> + while (i--) >> nvmem_cell_drop(cells[i]); > No, this will not work. > > 3 issues, > > 1> If we enter this err path from nvmem_cell_info_to_nvmem_cell() > failures, you would be accessing already freed cells[i]. > > 2> accessing un-allocated cells[i]. > > 3> you would be trying to drop cells which are not in the list. > > > This is what you need here to fix it correctly. > > while (--i >= 0) > Sigh. http://thread.gmane.org/gmane.linux.kernel.mm/146058/focus=2149595 TL;DR: They're equivalent. Rasmus
Powered by blists - more mailing lists