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: Sat, 11 Apr 2015 09:48:11 -0400 From: Theodore Ts'o <tytso@....edu> To: Dan Carpenter <dan.carpenter@...cle.com> Cc: walter harms <wharms@....de>, Julia Lawall <julia.lawall@...6.fr>, Michael Halcrow <mhalcrow@...gle.com>, Andreas Dilger <adilger.kernel@...ger.ca>, linux-ext4@...r.kernel.org, kernel-janitors@...r.kernel.org Subject: Re: [patch] ext4 crypto: testing the wrong variable On Wed, Apr 08, 2015 at 03:22:51PM +0300, Dan Carpenter wrote: > > why test *buf == NULL ? xfree() can handle this. > > > > the question is do programm depend on *buf=NULL. > > In case of IS_ERR(*buf) *buf will be left unchanged > > and later prgramms may things there is a buffer > > available ? > > Good point. That IS_ERR() check is going to cause all kinds of future > bugs. Yes, it's not needed at all, so I'll just remove it. I'm also going to be fixing the whole fname_crypto_alloc_buffer() and fname_crypto_free_buffer() so the calling convention isn't as horrendous. So basically, instead of int ext4_fname_crypto_alloc_buffer(struct ext4_fname_crypto_ctx *ctx, unsigned char **obuf, u32 *olen, u32 ilen); void ext4_fname_crypto_free_buffer(void **buf); it will be: int ext4_fname_crypto_alloc_buffer(struct ext4_fname_crypto_ctx *ctx, struct ext4_str *crypto_str, u32 ilen); void ext4_fname_crypto_free_buffer(struct ext4_str *crypto_str); (And BTW, this isn't appropriate for kernel-janitors since this code isn't upstream yet) - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists