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: <20140912162834.GE7996@ZenIV.linux.org.uk>
Date:	Fri, 12 Sep 2014 17:28:34 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Seunghun Lee <waydi1@...il.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: remove redundant sanity check in do_mount

On Sat, Sep 13, 2014 at 12:53:32AM +0900, Seunghun Lee wrote:
> In sys_mount, getname() checks dir_name.
> So do_mount needn't check dir_name again.

... and simple grep shows four more call sites.  At the very least, the
commit message needs to cover those as well, *if* the check is, indeed,
redundant.  From the look through those guys it looks like it is, but...
I wonder if it would make more sense to pass char __user * instead of
char * here.  And do getname() inside do_mount().  As it is, we do
getname() in all callers *and* never look into the result of said getname()
until passing it to do_mount().  So how about just passing userland pointer
all the way down to do_mount() (grep for callers and watch out for ones
in arch/alpha/kernel/osf_sys.c) and doing getname() in do_mount() itself?
--
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