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: <1283276606.1377.244.camel@gandalf.stny.rr.com>
Date:	Tue, 31 Aug 2010 13:43:26 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Wen Congyang <wency@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, Theodore Ts'o <tytso@....edu>,
	Li Zefan <lizf@...fujitsu.com>
Subject: Re: [Patch] ext4: avoid null dereference

On Fri, 2010-08-27 at 16:49 +0800, Wen Congyang wrote:
> ac->inode is set to null in function ext4_mb_release_group_pa(),
> and then trace_ext4_mballoc_discard(ac) is called, the kernel
> will panic.

> diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
> index 01e9e00..6a1fcff 100644
> --- a/include/trace/events/ext4.h
> +++ b/include/trace/events/ext4.h
> @@ -796,8 +796,9 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
>  	),
>  
>  	TP_fast_assign(
> -		__entry->dev		= ac->ac_inode->i_sb->s_dev;
> -		__entry->ino		= ac->ac_inode->i_ino;
> +		__entry->dev		= ac->ac_sb->s_dev;
> +		__entry->ino		= ac->ac_inode ?
> +						ac->ac_inode->i_ino : 0;

Is i_ino == 0 a valid inode number?

If not, then

Acked-by: Steven Rostedt <rostedt@...dmis.org>

-- Steve

>  		__entry->result_logical	= ac->ac_b_ex.fe_logical;
>  		__entry->result_start	= ac->ac_b_ex.fe_start;
>  		__entry->result_group	= ac->ac_b_ex.fe_group;


--
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