From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id B406F6B036C for ; Thu, 17 Nov 2016 18:17:29 -0500 (EST) Received: by mail-wm0-f69.google.com with SMTP id a20so971884wme.5 for ; Thu, 17 Nov 2016 15:17:29 -0800 (PST) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com. [2a00:1450:400c:c09::236]) by mx.google.com with ESMTPS id mp16si4887292wjb.279.2016.11.17.15.17.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 15:17:28 -0800 (PST) Received: by mail-wm0-x236.google.com with SMTP id g23so3144601wme.1 for ; Thu, 17 Nov 2016 15:17:28 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <87shqpzpok.fsf_-_@xmission.com> References: <20161019172917.GE1210@laptop.thejh.net> <87pomwi5p2.fsf@xmission.com> <87pomwghda.fsf@xmission.com> <87twb6avk8.fsf_-_@xmission.com> <87inrmavax.fsf_-_@xmission.com> <20161117204707.GB10421@1wt.eu> <20161117213258.GA10839@1wt.eu> <874m3522sy.fsf@xmission.com> <87shqpzpok.fsf_-_@xmission.com> From: Kees Cook Date: Thu, 17 Nov 2016 15:17:27 -0800 Message-ID: Subject: Re: [REVIEW][PATCH 2/3] ptrace: Don't allow accessing an undumpable mm Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: "Eric W. Biederman" Cc: Willy Tarreau , Linux Containers , Oleg Nesterov , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Linux FS Devel , Michal Hocko , Jann Horn , Andy Lutomirski On Thu, Nov 17, 2016 at 2:50 PM, Eric W. Biederman wrote: > > It is the reasonable expectation that if an executable file is not > readable there will be no way for a user without special privileges to > read the file. This is enforced in ptrace_attach but if ptrace > is already attached before exec there is no enforcement for read-only > executables. Given the corner cases being fixed here, it might make sense to add some simple tests to tools/testing/sefltests/ptrace/ to validate these changes and avoid future regressions. Regardless, it'll be nice to have this fixed. :) -Kees -- Kees Cook Nexus Security -- 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