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>] [day] [month] [year] [list]
Date:	Mon, 2 Nov 2015 19:46:28 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	"Jin, Yihua" <yihua.jin@...el.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: question about commit "proc: make proc_fd_permission()
	thread-friendly"

Hi Jin,

(add lkml)

On 11/02, Jin, Yihua wrote:
>
> --- a/fs/proc/fd.c<http://kernel.suse.com/cgit/kernel/tree/fs/proc/fd.c?h=SLE12&id=a3c039929d01f793c47922017b6c0ae438e11598>
> +++ b/fs/proc/fd.c<http://kernel.suse.com/cgit/kernel/tree/fs/proc/fd.c?h=SLE12&id=96d0df79f2644fc823f26c06491e182d87a90c2a>
> @@ -286,7 +286,7 @@ int proc_fd_permission(struct inode *inode, int mask)
> int rv = generic_permission(inode, mask);
> if (rv == 0)
> return 0;
> - if (task_pid(current) == proc_pid(inode))
> + if (task_tgid(current) == proc_pid(inode))
> rv = 0;
> return rv;
> }
>
> I understand the intention is to make sub-thread access /proc/self/fd/ OK, however, after this commit, access /proc/<tid>/fd/ is denied if the process is non-dumpable.
>
> This make application in a delimma:
> Before your commit, application sub-thread can access /proc/<tid>/fd/, but not /proc/self/fd/, after your commit, application sub-thread can access /proc/self/fd/, but not /proc/<tid>/fd/.
> This make application impossible to adapt both to kernel before the commit and kernel after the commit.

Yes thanks... I'll try to think tomorrow.

Oleg.

--
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