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: <6cde43c8-3300-9269-7a8a-8ff6e8b1e287@gmail.com>
Date:   Wed, 22 Mar 2023 20:27:15 +0300
From:   Andrei Borzenkov <arvidjaar@...il.com>
To:     Qu Wenruo <quwenruo.btrfs@....com>,
        Ext4 <linux-ext4@...r.kernel.org>,
        "linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>
Subject: Re: A new special orphan inode 12 in ext4 only?

On 22.03.2023 12:09, Qu Wenruo wrote:
> Hi,
> 
> Recently I observed newer mkfs.ext4 seems to create a new orphan inode
> 12, with some file extents.
> 
> Which seems to have no direct parent directory, thus tools like
> btrfs-convert would also follow the ext4 inodes by creating an orphan
> inode too.
> 
> On the other hand, if I go mkfs.ext3, the mysterious inode seems to be gone.
> 
> Is this inode 12 a known special inode?

This is orphan file. It is normal file; mke2fs creates first normal 
inode for lost+found (11) and if enabled creates orphan file next which 
gets next inode number (12). Inode number is recorded in superblock as 
s_orphan_file_num.

/*27c*/ __le16  s_encoding;             /* Filename charset encoding */
         __le16  s_encoding_flags;       /* Filename charset encoding 
flags */
         __le32  s_orphan_file_inum;     /* Inode for tracking orphan 
inodes */


> If so, how can we avoid such special inode?
> (s_special_ino is still 11, thus checking against that value doesn't
> seem to help).
> 
> 
> Some details of btrfs-convert:
> 
> It goes with ext2fs_open_inode_scan() to iterate all inodes of an ext4.
> 
> And if we hit an directory inode, we iterate the directory by using
> ext2fs_dir_iterate2() to insert the dir entries between parent and child
> inodes.
> 
> So if we hit an inode without any parent dir, an equivalent btrfs inode
> would still be created, but btrfs-check would complain about such orphan
> inode.
> 
> Thanks,
> Qu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ