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]
Date:	Thu, 1 Sep 2011 18:43:33 +0200
From:	Jan Kara <jack@...e.cz>
To:	Tao Ma <tm@....ma>
Cc:	linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH ] ext3: Fix a possible corruption in dx_probe.

On Wed 31-08-11 23:57:24, Tao Ma wrote:
> From: Tao Ma <boyu.mt@...bao.com>
> 
> For all the callers of dx_probe, frame_in is passed in uninitialized.
> So we should set frame->bh to NULL in the beginning of while, not
> the end. Otherwise, the first "goto fail2" will try to brelse(frame->bh)
> while frame->bh is still invalid.
  I think this happens at the beginning of dx_probe().

								Honza
> 
> Cc: Jan Kara <jack@...e.cz>
> Signed-off-by: Tao Ma <boyu.mt@...bao.com>
> ---
>  fs/ext3/namei.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
> index 34b6d9b..45468b9 100644
> --- a/fs/ext3/namei.c
> +++ b/fs/ext3/namei.c
> @@ -404,6 +404,7 @@ dx_probe(struct qstr *entry, struct inode *dir,
>  	dxtrace (printk("Look up %x", hash));
>  	while (1)
>  	{
> +		frame->bh = NULL;
>  		count = dx_get_count(entries);
>  		if (!count || count > dx_get_limit(entries)) {
>  			ext3_warning(dir->i_sb, __func__,
> @@ -458,7 +459,6 @@ dx_probe(struct qstr *entry, struct inode *dir,
>  			goto fail2;
>  		}
>  		frame++;
> -		frame->bh = NULL;
>  	}
>  fail2:
>  	while (frame >= frame_in) {
> -- 
> 1.7.0.4
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ