mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Max Ver <dudududumaxver@gmail.com>,
	linux-kernel@vger.kernel.org, bpf@vger.kernel.org
Cc: Andy Lutomirski <luto@amacapital.net>,
	Will Drewry <wad@chromium.org>, Oleg Nesterov <oleg@redhat.com>
Subject: Re: Process killed by seccomp looks live by tracer
Date: Wed, 04 Mar 2026 10:05:37 -0800	[thread overview]
Message-ID: <DEEAE764-41EA-4760-9606-341317E9FDC2@kernel.org> (raw)
In-Reply-To: <CABjJbFJO+p3jA1r0gjUZrCepQb1Fab3kqxYhc_PSfoqo21ypeQ@mail.gmail.com>



On March 4, 2026 2:51:38 AM PST, Max Ver <dudududumaxver@gmail.com> wrote:
>I was using ptrace to trace a tracee status, using
>`PTRACE_GET_SYSCALL_INFO` and `PTRACE_SYSCALL`
>to get its syscall arguments and results. When a tracee killed by its
>seccomp, the tracer can't know immediately,
>instead, the `PTRACE_GET_SYSCALL_INFO` tell tracer that tracee exit
>with no error. The syscall wasn't actually
>executed, it was captured by seccomp, even the tracee was killed by seccomp.
>
>Here is a poc explaining what I said.
>I was expecting to aware the death of tracee at the fourth
>`PTRACE_GET_SYSCALL_INFO`,
>at least `PTRACE_GET_SYSCALL_INFO` should tell that the syscall
>failed, or get some different message from waitpid.
>But the result are below. Tracer can only get the death of tracee at
>the fifth loop.

This is expected; PTRACE_GET_SYSCALL_INFO is at syscall entry before seccomp filtering has run.

-- 
Kees Cook

  reply	other threads:[~2026-03-04 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 10:51 Max Ver
2026-03-04 18:05 ` Kees Cook [this message]
2026-03-05  2:00   ` Max Ver
2026-03-05 14:49     ` Oleg Nesterov
2026-03-05 17:45       ` Oleg Nesterov
2026-03-06  2:55         ` Max Ver
2026-03-08 13:08           ` Oleg Nesterov
2026-03-22 13:40             ` Oleg Nesterov

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=DEEAE764-41EA-4760-9606-341317E9FDC2@kernel.org \
    --to=kees@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=dudududumaxver@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=oleg@redhat.com \
    --cc=wad@chromium.org \
    /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

all inboxes | Powered by JetHome®