From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id DDEEF6B032E for ; Thu, 17 Nov 2016 12:07:35 -0500 (EST) Received: by mail-qt0-f200.google.com with SMTP id 41so83841451qtn.7 for ; Thu, 17 Nov 2016 09:07:35 -0800 (PST) Received: from out03.mta.xmission.com (out03.mta.xmission.com. [166.70.13.233]) by mx.google.com with ESMTPS id s194si1531888oih.181.2016.11.17.09.07.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 09:07:35 -0800 (PST) From: ebiederm@xmission.com (Eric W. Biederman) References: <87twcbq696.fsf@x220.int.ebiederm.org> <20161018135031.GB13117@dhcp22.suse.cz> <8737jt903u.fsf@xmission.com> <20161018150507.GP14666@pc.thejh.net> <87twc9656s.fsf@xmission.com> <20161018191206.GA1210@laptop.thejh.net> <87r37dnz74.fsf@xmission.com> <87k2d5nytz.fsf_-_@xmission.com> <87y41kjn6l.fsf@xmission.com> <20161019172917.GE1210@laptop.thejh.net> <87pomwi5p2.fsf@xmission.com> <87pomwghda.fsf@xmission.com> Date: Thu, 17 Nov 2016 11:02:47 -0600 In-Reply-To: (Andy Lutomirski's message of "Wed, 19 Oct 2016 16:17:30 -0700") Message-ID: <87twb6avk8.fsf_-_@xmission.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [REVIEW][PATCH 0/3] Fixing ptrace vs exec vs userns interactions Sender: owner-linux-mm@kvack.org List-ID: To: Linux Containers Cc: Oleg Nesterov , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Linux FS Devel , Michal Hocko , Jann Horn , Willy Tarreau , Kees Cook , Andy Lutomirski With everyone heading to Kernel Summit and Plumbers I put this set of patches down temporarily. Now is the time to take it back up and to make certain I am not missing something stupid in this set of patches. There are other issues in this area as well, but these are the pieces that I can see clearly, and have tested fixes for. Andy as to your criticism about using strace sudo I can't possibly see how that is effective or useful. Under strace sudo won't run as root today, and will immediately exit because it is not root. Furthermore the only place I can find non-readable executables is people hardening suid root executables so they are more difficult to trace. So I definitely think we should honor the unix permissions and people's expressed wishes. Eric W. Biederman (3): ptrace: Capture the ptracer's creds not PT_PTRACE_CAP exec: Don't allow ptracing an exec of an unreadable file exec: Ensure mm->user_ns contains the execed files fs/exec.c | 26 +++++++++++++++++++++++--- include/linux/capability.h | 2 ++ include/linux/ptrace.h | 1 - include/linux/sched.h | 1 + kernel/capability.c | 36 ++++++++++++++++++++++++++++++++++-- kernel/ptrace.c | 12 +++++++----- 6 files changed, 67 insertions(+), 11 deletions(-) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org