[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR03MB5170396D87DED49FE00BC624E4FB0@AM6PR03MB5170.eurprd03.prod.outlook.com>
Date: Sat, 14 Mar 2020 10:12:43 +0100
From: Bernd Edlinger <bernd.edlinger@...mail.de>
To: Kirill Tkhai <ktkhai@...tuozzo.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Christian Brauner <christian.brauner@...ntu.com>,
Kees Cook <keescook@...omium.org>,
Jann Horn <jannh@...gle.com>, Jonathan Corbet <corbet@....net>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Oleg Nesterov <oleg@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>,
Andrei Vagin <avagin@...il.com>,
Ingo Molnar <mingo@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Yuyang Du <duyuyang@...il.com>,
David Hildenbrand <david@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Anshuman Khandual <anshuman.khandual@....com>,
David Howells <dhowells@...hat.com>,
James Morris <jamorris@...ux.microsoft.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Shakeel Butt <shakeelb@...gle.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Christian Kellner <christian@...lner.me>,
Andrea Arcangeli <aarcange@...hat.com>,
Aleksa Sarai <cyphar@...har.com>,
"Dmitry V. Levin" <ldv@...linux.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>
Subject: [PATCH 0/2] exec: Fix dead-lock in de_thread with ptrace_attach
This completes the new infrastructure patch, and replaces the
cred_guard_mutex with an exec_guard_mutex, and a boolean, that
is set, when a dead-lock situation is detected.
I also change ptrace_traceme to use the new mutex, but I consider
it a bug, that it didn't take any mutex previously since it calls
security_ptrace_traceme, and all the security modules operate under
the assumption that execve is not operating in parallel.
This patch fixes the test case tools/testing/selftests/ptrace/vmaccess:
[==========] Running 2 tests from 1 test cases.
[ RUN ] global.vmaccess
[ OK ] global.vmaccess
[ RUN ] global.attach
[ OK ] global.attach <= this was still failing
[==========] 2 / 2 tests passed.
[ PASSED ]
Yes, it is an API change, but only in some very special case,
so I would exepect this to be un-noticeable to user space applications.
Bernd Edlinger (2):
exec: Fix dead-lock in de_thread with ptrace_attach
doc: Update documentation of ->exec_*_mutex
Documentation/security/credentials.rst | 29 +++++++++++++++-------
fs/exec.c | 44 +++++++++++++++++++++++++++-------
fs/proc/base.c | 13 ++++++----
include/linux/sched/signal.h | 14 +++++++----
init/init_task.c | 2 +-
kernel/cred.c | 2 +-
kernel/fork.c | 2 +-
kernel/ptrace.c | 20 +++++++++++++---
kernel/seccomp.c | 15 +++++++-----
9 files changed, 102 insertions(+), 39 deletions(-)
--
1.9.1
Powered by blists - more mailing lists