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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTimh30b=Dfv41zQ9Q+rmkmVCP8X7oOtt6VQyw9ap@mail.gmail.com>
Date:	Tue, 17 Aug 2010 16:14:58 +0300
From:	Jouni Malinen <jkmalinen@...il.com>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Nick Piggin <npiggin@...e.de>, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, Jouni Malinen <j@...fi>
Subject: Re: [git pull] vfs series, part 1

On Tue, Aug 10, 2010 at 6:35 AM, Al Viro <viro@...iv.linux.org.uk> wrote:
>        Assorted work from the last cycle; among other things, there's
> a filesystem API change (->evict_inode() series), a lot of truncate
> rework stuff (mostly by Chris) and a bunch of fixes.

Linux 2.6.36-rc1 seemed to break my UML hostfs setup or well, make it
behave in very odd ways.. No matter what directory I'm trying to read
from hostfs in UML, the root directory seems to be returned. I have
hostfs mounted in UML into /mnt/host and "ls /mnt/host" and "ls
/mnt/host/etc" show the same directory. Actually, any unknown
directory like "/mnt/host/does-not-exist" shows the same root
directory.. Obviously something is going quite wrong in mapping the
path name to directory entry.

 Based on a quick git bisect, the main part of the issue seems to be
caused or at least triggered by a change in this set:

>      hostfs: fix races in dentry_name() and inode_name()

e9193059b1b3733695d5b80e667778311695aa73 is the first bad commit
commit e9193059b1b3733695d5b80e667778311695aa73
Author: Al Viro <viro@...iv.linux.org.uk>
Date:   Sun Jun 6 23:16:34 2010 -0400

    hostfs: fix races in dentry_name() and inode_name()

    calculating size, then doing allocation, then filling the
    path is a Bad Idea(tm), since the ancestors can be renamed,
    leading to buffer overrun.

    Signed-off-by: Al Viro <viro@...iv.linux.org.uk>

In addition, reverting just that commit allows hostfs to be used with
2.6.36-rc1. Though, there seems to be some additional issues with
symlinks, so there could be something else related to this change that
is actually causing the problems. The other issues result in memory
allocation failing when reading symlinks:

# ls /mnt/host/
ls: cannot read symbolic link /mnt/host/vmlinuz: Cannot allocate memory
ls: cannot read symbolic link /mnt/host/vmlinuz.old: Cannot allocate memory

(this is not only limited to ls; "ln -s p.patch a.patch; cat a.patch"
results in same from cat)

Other than that, hostfs seems to be working, though.

Any idea what caused this regression and how to fix it properly? I can
work around this by reverting the patch pointed out by git bisect, but
surely that is not the proper fix for the issues.

- Jouni
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ