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]
Date:	Wed, 07 Dec 2011 12:26:25 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	viro@...IV.linux.org.uk
Cc:	john.johansen@...onical.com, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, torvalds@...ux-foundation.org
Subject: Re: [git pull] apparmor fix for __d_path() misuse

Al Viro wrote:
> diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
> index 738bbdf..36fa7c9 100644
> --- a/security/tomoyo/realpath.c
> +++ b/security/tomoyo/realpath.c
> @@ -101,9 +101,8 @@ static char *tomoyo_get_absolute_path(struct path *path, char * const buffer,
>  {
>         char *pos = ERR_PTR(-ENOMEM);
>         if (buflen >= 256) {
> -               struct path ns_root = { };
>                 /* go to whatever namespace root we are under */
> -               pos = __d_path(path, &ns_root, buffer, buflen - 1);
> +               pos = d_absolute_path(path, buffer, buflen - 1);
>                 if (!IS_ERR(pos) && *pos == '/' && pos[1]) {
>                         struct inode *inode = path->dentry->d_inode;
>                         if (inode && S_ISDIR(inode->i_mode)) {

Currently, TOMOYO assumes that -ENAMETOOLONG is the only error which __d_path()
might return (and retries with larger buffer size unless kmalloc() fails).
If d_absolute_path() starts returning -EINVAL, TOMOYO will deny requests even
if "partial (I mean the result would have been different if reachable)"
pathname is granted by the policy.

How commonly can conditions that make d_absolute_path() return -EINVAL happen?



Linus Torvalds wrote:
> I don't know of any big distro that uses Tomoyo, so...
Ubuntu, Debian, OpenSUSE, ArchLinux, Mandriva...
Hope you know one of these distro. ;-)
--
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