Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751921AbbFBV23 (ORCPT ); Tue, 2 Jun 2015 17:28:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbbFBV2S (ORCPT ); Tue, 2 Jun 2015 17:28:18 -0400 Date: Tue, 2 Jun 2015 23:27:22 +0200 From: Oleg Nesterov To: Pavel Emelyanov Cc: Tycho Andersen , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Kees Cook , Andy Lutomirski , Will Drewry , Roland McGrath , "Serge E. Hallyn" Subject: Re: [PATCH] seccomp: add ptrace commands for suspend/resume Message-ID: <20150602212722.GA32356@redhat.com> References: <1433186918-9626-1-git-send-email-tycho.andersen@canonical.com> <20150602182829.GA23449@redhat.com> <556DFDB2.3050205@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <556DFDB2.3050205@parallels.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 33 On 06/02, Pavel Emelyanov wrote: > > > And I am not sure I understand why do we need the additional security > > check, but I leave this to you and Andy. > > > > If you have the rights to trace this task, then you can do anything > > the tracee could do without the filtering. > > I think _this_ check is required, otherwise the seccomp-ed task (in > filtered mode) fork-s a child, then this child ptrace-attach to parent > (allowed) then suspend its seccomd. If you force (hack) that task to do this. And if the seccomp-ed task does this by its own we do not care. > And -- we have unpriviledged process > de-seccomped. Heh. The case when the priviledged CAP_SYS_ADMIN process escapes the filtering is much worse I think ;) But as I said I will nott argue, just I think this needs a bit of documentantion. And I agree in advance with something like "better be safe than sorry, we can always remove this later" comment or a note in the changelog. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/