mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
	"linux-man@vger.kernel.org" <linux-man@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] seccomp.2: Note that memory area is read-only
Date: Sat, 18 Apr 2015 17:29:43 -0700	[thread overview]
Message-ID: <20150419002942.GA733@Alexeis-MBP.westell.com> (raw)
In-Reply-To: <CAGXu5jLriPDQR=BDDe7ztVua+-0wLDd-vsFZt5eu18ThYN69nA@mail.gmail.com>

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)
> <mtk.manpages@gmail.com> 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.


  reply	other threads:[~2015-04-19  0:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5522A66F.9060606@gmail.com>
2015-04-18 11:17 ` Michael Kerrisk (man-pages)
2015-04-18 23:37 ` Kees Cook
2015-04-19  0:29   ` Alexei Starovoitov [this message]
2015-04-19  7:32   ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150419002942.GA733@Alexeis-MBP.westell.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome