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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240719122104.c5nzc6m3uoszgbj2@quack3>
Date: Fri, 19 Jul 2024 14:21:04 +0200
From: Jan Kara <jack@...e.cz>
To: Ted Tso <tytso@....edu>
Cc: adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
	carrion bent <carrionbent@...ux.alibaba.com>
Subject: Re: [PATCH v2] ext4: fix macro definition error of EXT4_DIRENT_HASH
 and EXT4_DIRENT_MINOR_HASH

On Thu 06-06-24 13:43:16, carrion bent wrote:
>     the macro parameter 'entry' of EXT4_DIRENT_HASH and
>     EXT4_DIRENT_MINOR_HASH was not used, but rather the
>     variable 'de' was directly used, which may be a local
>     variable inside a function that calls the macros.
>     Fortunately, all callers have passed in 'de' so far,
>     so this bug didn't have an effect.
> 
> Signed-off-by: carrion bent <carrionbent@...ux.alibaba.com>

Ted, this seems to have fallen through the cracks. The bug in the macro is
really nasty trap...

								Honza

> ---
>  fs/ext4/ext4.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 983dad8..04bdd27 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -2338,9 +2338,9 @@ struct ext4_dir_entry_2 {
>  	((struct ext4_dir_entry_hash *) \
>  		(((void *)(entry)) + \
>  		((8 + (entry)->name_len + EXT4_DIR_ROUND) & ~EXT4_DIR_ROUND)))
> -#define EXT4_DIRENT_HASH(entry) le32_to_cpu(EXT4_DIRENT_HASHES(de)->hash)
> +#define EXT4_DIRENT_HASH(entry) le32_to_cpu(EXT4_DIRENT_HASHES(entry)->hash)
>  #define EXT4_DIRENT_MINOR_HASH(entry) \
> -		le32_to_cpu(EXT4_DIRENT_HASHES(de)->minor_hash)
> +		le32_to_cpu(EXT4_DIRENT_HASHES(entry)->minor_hash)
>  
>  static inline bool ext4_hash_in_dirent(const struct inode *inode)
>  {
> -- 
> 2.7.4
> 
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ