[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211209134419.GA17186@blackbody.suse.cz>
Date: Thu, 9 Dec 2021 14:44:19 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Tejun Heo <tj@...nel.org>
Cc: Linus Torvalds <torvalds@...uxfoundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Linux Kernel Mailing List <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 Officers <security@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
Jann Horn <jannh@...gle.com>,
Christian Brauner <christian.brauner@...ntu.com>
Subject: Re: [PATCH] exit: Retain nsproxy for exit_task_work() work entries
On Wed, Dec 08, 2021 at 01:07:54PM -1000, Tejun Heo <tj@...nel.org> wrote:
> + saved_cred = override_creds(of->file->f_cred);
> ret = cgroup_attach_permissions(src_cgrp, dst_cgrp,
> - of->file->f_path.dentry->d_sb, threadgroup);
> + of->file->f_path.dentry->d_sb,
> + threadgroup, ctx->ns);
> + revert_creds(saved_cred);
I wonder now whether such a wrap shouldn't also be around cgroup_kill()
too (+ replacement of send_sig() with group_send_sig_info() [1])?
This shouldn't break the use case of passing cgroup kill fd to a less
privileged task for (auto)destruction purposes but on the other hand it
would prevent subverting the fd to a more privileged confused task to
kill otherwise disallowed processes.
Thanks,
Michal
[1] https://lore.kernel.org/r/m1v97x6niq.fsf@fess.ebiederm.org/
Powered by blists - more mailing lists