public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Qi Tang <tpluszz77@gmail.com>
To: Lorenzo Stoakes <ljs@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	David Hildenbrand <david@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	linux-kernel@vger.kernel.org, Qi Tang <tpluszz77@gmail.com>
Subject: Re: [PATCH] prctl: require checkpoint_restore_ns_capable for PR_SET_MM_MAP
Date: Thu,  2 Apr 2026 21:51:07 +0800	[thread overview]
Message-ID: <20260402135107.80152-1-tpluszz77@gmail.com> (raw)
In-Reply-To: <20260402111332.55957-1-tpluszz77@gmail.com>

Thanks for the detailed review, and sorry for the noise on the
SELinux angle. file_map_prot_check() still enforces
PROCESS__EXECMEM, so that bypass doesn't work.

You're right that gating the entire PR_SET_MM_MAP call is too
broad and could break existing users that only update harmless
fields like arg_start/arg_end.

The intent was to address the case where exe_fd is -1: the
existing checkpoint_restore_ns_capable() check only fires when
exe_fd != (u32)-1, so updating mm boundaries alone has no
permission check.

As noted in this thread, the man page also states PR_SET_MM
requires CAP_SYS_RESOURCE, and the individual field path
enforces that, but the MAP path does not. Is this inconsistency
intentional?

Qi Tang

  parent reply	other threads:[~2026-04-02 13:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 11:13 [PATCH] prctl: require checkpoint_restore_ns_capable for PR_SET_MM_MAP Qi Tang
2026-04-02 12:57 ` Oleg Nesterov
2026-04-02 13:07   ` Lorenzo Stoakes (Oracle)
2026-04-02 13:13   ` Oleg Nesterov
2026-04-02 13:41     ` David Hildenbrand (Arm)
2026-04-02 13:06 ` Lorenzo Stoakes (Oracle)
2026-04-02 13:55   ` David Hildenbrand (Arm)
2026-04-02 14:05     ` David Hildenbrand (Arm)
2026-04-02 14:21     ` Lorenzo Stoakes (Oracle)
2026-04-02 14:27       ` David Hildenbrand (Arm)
2026-04-02 17:46         ` Andrei Vagin
2026-04-02 13:30 ` David Hildenbrand (Arm)
2026-04-02 13:51 ` Qi Tang [this message]
2026-04-02 17:47 ` Andrew Morton
2026-04-03  3:54   ` Qi Tang

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=20260402135107.80152-1-tpluszz77@gmail.com \
    --to=tpluszz77@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=gorcunov@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=oleg@redhat.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