Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752466AbbDSA3q (ORCPT ); Sat, 18 Apr 2015 20:29:46 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:34012 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbbDSA3n (ORCPT ); Sat, 18 Apr 2015 20:29:43 -0400 Date: Sat, 18 Apr 2015 17:29:43 -0700 From: Alexei Starovoitov To: Kees Cook Cc: "Michael Kerrisk (man-pages)" , "linux-man@vger.kernel.org" , lkml Subject: Re: [patch] seccomp.2: Note that memory area is read-only Message-ID: <20150419002942.GA733@Alexeis-MBP.westell.com> References: <5522A66F.9060606@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1248 Lines: 25 On Sat, Apr 18, 2015 at 04:37:35PM -0700, Kees Cook wrote: > On Mon, Apr 6, 2015 at 8:29 AM, Michael Kerrisk (man-pages) > wrote: > > Hi Kees, > > > > I recently was asked about the point below, and had to go check the code > > to be sure, since the man page said nothing. It would be good to have > > a confirmation: the seccomp_data buffer supplied to a seccomp BPF program > > is read-only, right? (That is, one can't write to the buffer in order to > > change the arguments that a system call actually receives.) > > That's correct. If BPF even allows changing the data, it's not copied > back to the syscall when it runs. Anything wanting to do things like > that would need to use ptrace to catch the call an directly modify the > registers before continuing with the call. Today BPF programs can only read from seccomp_data buffer. I think it would be an interesting feature to allow overwrite of syscall arguments by the program on the fly... sometime in the future. -- 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/