[Bug 199179] Invalid pointer dereference when mounting crafted ext4 image in ext4_process_freed_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=199179

Jan Kara (jack@xxxxxxx) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jack@xxxxxxx

--- Comment #4 from Jan Kara (jack@xxxxxxx) ---
Ted, I'm not quite getting it: ext4_iget() should fail getting the root inode
in case i_links_count is 0. It should return -ESTALE and mark the inode as bad.
So iput() will call ext4_evict_inode() but because the inode is marked as bad,
we skip any attempts to delete the inode and just call ext4_clear_inode(). But
apparently that didn't happen and ext4_iget() succeeded despite inode having
i_links_count == 0. So the question is why the check:

        if (inode->i_nlink == 0) {
                if ((inode->i_mode == 0 ||
                     !(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS))
&&
                    ino != EXT4_BOOT_LOADER_INO) {
                        /* this inode is deleted */
                        ret = -ESTALE;
                        goto bad_inode;
                }

in ext4_iget() didn't trigger...

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux