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: <20070207205028.GA13836@lombardij>
Date:	Wed, 7 Feb 2007 21:50:28 +0100
From:	Johann Lombardi <johann.lombardi@...l.net>
To:	Kalpak Shah <kalpak@...sterfs.com>
Cc:	linux-ext4 <linux-ext4@...r.kernel.org>,
	Andreas Dilger <adilger@...sterfs.com>, tytso <tytso@....edu>,
	sct <sct@...hat.com>
Subject: Re: [RFC] [PATCH 1/1] Nanosecond timestamps

On Fri, Feb 02, 2007 at 08:19:50PM +0530, Kalpak Shah wrote:
> +#define EXT3_INODE_SET_XTIME(xtime, extra_xtime, inode, raw_inode) \
> +do { \
> +       (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \
> + \
> +       if (offsetof(typeof(*raw_inode), extra_xtime) - \
> +           offsetof(typeof(*raw_inode), i_extra_isize) + \
> +           sizeof((raw_inode)->extra_xtime) <= \
> +               le16_to_cpu((raw_inode)->i_extra_isize)) \
                               ^^^^^^^^^^^^^^^^^^^^^^^^^
> +               (raw_inode)->extra_xtime = \

With 128-byte inodes, raw_inode->i_extra_isize is beyond the inode limit
and the above will corrupt the filesystem.
IMO, i_extra_isize from ext3_inode_info should be used instead of
raw_inode->i_extra_isize.

> +#define EXT3_INODE_GET_XTIME(xtime, extra_xtime, inode, raw_inode) \
> +do { \
> +       (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \
> + \
> +       if (offsetof(typeof(*raw_inode), extra_xtime) - \
> +           offsetof(typeof(*raw_inode), i_extra_isize) + \
> +           sizeof((raw_inode)->extra_xtime) <= \
> +           le16_to_cpu((raw_inode)->i_extra_isize)) { \
                           ^^^^^^^^^^^^^^^^^^^^^^^^^
ditto

Cheers,
Johann
-
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