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 <>
To:	Jan Kara <>
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 <>

Applied, thanks.

					- Ted
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists