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-next>] [day] [month] [year] [list]
Date:	Thu, 05 Nov 2015 17:18:57 +0000
From:	David Howells <dhowells@...hat.com>
To:	linux-ext4@...r.kernel.org
cc:	dhowells@...hat.com
Subject: Is EXT4_FITS_IN_INODE() broken?

Is EXT4_FITS_IN_INODE() broken?  It makes use of i_extra_isize - which is an
optional field and doesn't exist if the filesystem was made with "-I 128".

	(gdb) p &((struct ext4_inode *)0)->i_extra_isize
	$2 = (__le16 *) 0x80 <irq_stack_union+128>

Should EXT4_FITS_IN_INODE():

	#define EXT4_FITS_IN_INODE(ext4_inode, einode, field)	\
		((offsetof(typeof(*ext4_inode), field) +	\
		  sizeof((ext4_inode)->field))			\
		<= (EXT4_GOOD_OLD_INODE_SIZE +			\
		    (einode)->i_extra_isize))			\

be using EXT4_INODE_SIZE() and consulting the superblock instead?

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