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  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:	Mon, 10 Jun 2013 08:39:56 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Jan Kara <jack@...e.cz>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [RESEND] libext2fs: Provide functions to safely access name_len
 and file_type

On Tue, May 28, 2013 at 10:45:35AM -0000, Jan Kara wrote:
> Accessing name_len (and file_type) in ext4_dir_entry structure is somewhat
> problematic because on big endian architecture we need to now whether we
> are really dealing with ext4_dir_entry (which has u16 name_len which
> needs byte swapping) or ext4_dir_entry_2 (which has u8 name_len which
> must not be byte swapped).
> 
> Currently the code is somewhat surprising and name_len is always treated
> as u16 and byte swapped (flag EXT2_DIRBLOCK_V2_STRUCT isn't ever used)
> and then masking of name_len is used to access real name_len or
> file_type. Doing things this way in applications using libext2fs is
> unexpected to say the least (more natural is to type struct
> ext4_dir_entry * to struct ext4_dir_entry_2 * but that gives wrong
> results on big endian architectures. So provide helper functions that
> give endian-safe access to these fields. Also convert users in e2fsprogs
> to use these functions.
> 
> Signed-off-by: Jan Kara <jack@...e.cz>

Applied, thanks.

					- 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