Re: Intentionally corrupted vfat fs causing BUG

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

 



Al Viro <viro@xxxxxxxxxxxxxxxxxx> writes:

> On Thu, Oct 23, 2014 at 05:01:06PM +0100, Al Viro wrote:
>
>> Hmm...  Why hadn't d_splice_alias() caught that, though?
>
> Aha.  It's not namei_msdos.c part, it's namei_vfat.c one.  And there
> we don't call d_splice_alias() on the affected path...
>
> OK, so your check isn't enough.  What we need there is this:
> 	if (alias && alias->d_parent == dentry->d_parent && ...)
> Otherwise that d_move() isn't safe at all.

Hm, sounds like I'm missing something. what case has different
->d_parent on alias if prevented by my check?

> Moreover, for directories we don't want to bother with that codepath
> at all - d_splice_alias() will do that d_move() just fine there.

d_splice_alias() calls __d_find_alias() with want_discon==1, so
__d_find_alias() doesn't return dentry, and d_splice_alias() doesn't use
d_move() path, right?
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux