The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack@google.com>
To: Justin Suess <utilityemal77@gmail.com>
Cc: "Günther Noack" <gnoack3000@gmail.com>,
	mic@digikod.net, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2 0/6] landlock: Add scoped access bit for SysV message queues
Date: Mon, 24 Aug 2026 18:03:47 +0200	[thread overview]
Message-ID: <aoxrY9Iw05UhrYI6@google.com> (raw)
In-Reply-To: <aow07i8dFO6EAB-K@zenbox>

On Mon, Aug 24, 2026 at 08:47:28AM -0400, Justin Suess wrote:
> On Mon, Aug 24, 2026 at 08:36:10AM +0200, Günther Noack wrote:
> > Agreed.  I am personally leaning on the side of closing the gap as
> > well, even if it reduces functionality somewhat.  SystemV Message
> > Queues are used very seldomly (as can be seen in Debian Code Search)
> > and it would affect few programs.
> >
> From msgget(2):
> 
>        A new message queue is created if key has the value IPC_PRIVATE or
>        key isn't IPC_PRIVATE, no message queue with the given key key
>        exists, and IPC_CREAT is specified in msgflg.
> 
> So more specifically, we will disallow if all three of these are true:
> 
> - IPC_CREAT is specified
> - IPC_PRIVATE is not specified.
> - The queue referenced by key does not already exist
> 
> Or if these two are true:
> 
> - The queue referenced by key already exists.
> - The queue referenced by the key is not part of the scope.
> 
> Effectively, this allows as much as possible, including msgget(2) on an
> existing queue within a scope.

We technically allow msgget(2) on an existing queue within a scope,
but if I understand this correctly, there is now no way to *create* such a
queue within the scope.  So effectively, that msgget(2) can not
succeed, no?


I agree with your sentiment that we don't need to implement the
allow-listing approach right now.  It seems like significant effort for
a very small number of use cases.

—Günther

      reply	other threads:[~2026-08-24 16:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 23:08 [PATCH v2 0/6] landlock: Add scoped access bit for SysV message queues Justin Suess
2026-07-27 23:08 ` [PATCH v2 1/6] landlock: Add kern_ipc_perm credential blob structs Justin Suess
2026-07-27 23:08 ` [PATCH v2 2/6] landlock: Add LANDLOCK_SCOPE_SYSV_MSG_QUEUE Justin Suess
2026-07-27 23:08 ` [PATCH v2 3/6] landlock: Bump ABI for LANDLOCK_SCOPE_SYSV_MSG_QUEUE Justin Suess
2026-08-21 12:38   ` Günther Noack
2026-08-21 13:15     ` Justin Suess
2026-08-21 14:31       ` Justin Suess
2026-07-27 23:08 ` [PATCH v2 4/6] selftests/landlock: Test LANDLOCK_SCOPE_SYSV_MSG_QUEUE Justin Suess
2026-08-22  9:44   ` Günther Noack
2026-07-27 23:08 ` [PATCH v2 5/6] samples/landlock: Support LANDLOCK_SCOPE_SYSV_MSG_QUEUE in sandboxer Justin Suess
2026-07-27 23:08 ` [PATCH v2 6/6] landlock: Document LANDLOCK_SCOPE_SYSV_MSG_QUEUE Justin Suess
2026-08-22 17:26 ` [PATCH v2 0/6] landlock: Add scoped access bit for SysV message queues Günther Noack
2026-08-22 21:13   ` Günther Noack
2026-08-22 21:51     ` Justin Suess
2026-08-23 22:21       ` Günther Noack
2026-08-24  6:36       ` Günther Noack
2026-08-24 12:47         ` Justin Suess
2026-08-24 16:03           ` Günther Noack [this message]

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=aoxrY9Iw05UhrYI6@google.com \
    --to=gnoack@google.com \
    --cc=gnoack3000@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=utilityemal77@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