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: <YbECHjMLPEHO0vqA@slm.duckdns.org>
Date:   Wed, 8 Dec 2021 09:06:06 -1000
From:   Tejun Heo <tj@...nel.org>
To:     "Eric W. Biederman" <ebiederm@...ssion.com>
Cc:     Michal Koutný <mkoutny@...e.com>,
        linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        Kees Cook <keescook@...omium.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jim Newsome <jnewsome@...project.org>,
        Alexey Gladkov <legion@...nel.org>, security@...nel.org,
        Andy Lutomirski <luto@...capital.net>,
        Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH] exit: Retain nsproxy for exit_task_work() work entries

Hello, Eric.

On Wed, Dec 08, 2021 at 12:45:54PM -0600, Eric W. Biederman wrote:
> Permission checks on files need to happen at open time, not at
> write time.  It is all too easy to confuse something that writes
> to stdout to write to a file of your choosing to make permission
> checking at write time a good idea.

Whether a given operation is allowed or not is dependent on the content of
the write. I don't see how it can be moved to open time. I'm not a fan of
the fs based interface but they're not real files and it has been like this
from the beginning.

> That said I can't quite tell if the test should be moved into
> cgroup_file_open or if there is a permission entry that would work.

It can't.

> I may be wrong but at first glance this looks like the cgroup code is
> going to need significant surgery to get the permission checks happening
> at open time where they belong.

There's no way to change that without changing the interface drastically.

> Please don't apply this patch.
> 
> exit_task_work running after exit_task_namespaces is the messenger
> that just told us about something ugly.

I don't see good alternatives here. You got any?

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ