All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: Tingmao Wang <m@maowtm.org>
Cc: "Mickaël Salaün" <mic@digikod.net>,
	"Justin Suess" <utilityemal77@gmail.com>,
	"Günther Noack" <gnoack@google.com>,
	"Demi Marie Obenour" <demiobenour@gmail.com>,
	"Alyssa Ross" <hi@alyssa.is>, "Jann Horn" <jannh@google.com>,
	"Tahera Fahimi" <fahimitahera@gmail.com>,
	linux-security-module@vger.kernel.org,
	"Matthieu Buffet" <matthieu@buffet.re>
Subject: Re: [PATCH v2 0/6] Landlock: Implement scope control for pathname Unix sockets
Date: Sun, 8 Feb 2026 14:49:59 +0100	[thread overview]
Message-ID: <20260208.b25c4105bc03@gnoack.org> (raw)
In-Reply-To: <3f9d456f-8343-4b46-8770-38190f838dbe@maowtm.org>

On Sun, Feb 08, 2026 at 02:57:16AM +0000, Tingmao Wang wrote:
> On 2/5/26 19:15, Mickaël Salaün wrote:
> > On Thu, Feb 05, 2026 at 10:18:54AM -0500, Justin Suess wrote:
> >> On 2/4/26 13:28, Mickaël Salaün wrote:
> >>>> Tingmao:
> >>>>
> >>>> For connecting a pathname unix socket, the order of the hooks landlock sees is something like:
> >>>>
> >>>> 1.  security_unix_find. (to look up the paths)
> >>>>
> >>>> 2. security_unix_may_send, security_unix_stream_connect (after the path is looked up)
> 
> btw, ideally for pathname sockets we can leave all the checking in the
> security_unix_find() hook (as newly proposed, with the struct sock *other
> param), and not have to e.g. call domain_is_scoped() again in
> security_unix_may_send and security_unix_stream_connect, right?
> 
> (Although if this changes error codes, we might have to "delay" the denial
> until the may_send/connect hooks...?  Hopefully not but not checked.)

Thank you, Tingmao!

So far, the selftests that I already had in fs_test.c were
straightforward to extend so that they cover the new cases, but I'll
definitely have a look through your patch set and see if there are
parts that we can reuse or that I missed to cover.  Either way, I'll
make sure that you'll get appropriate credit for it. :)

–Günther

  parent reply	other threads:[~2026-02-08 13:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-30 17:20 [PATCH v2 0/6] Landlock: Implement scope control for pathname Unix sockets Tingmao Wang
2025-12-30 17:20 ` [PATCH v2 1/6] landlock: Add LANDLOCK_SCOPE_PATHNAME_UNIX_SOCKET scope bit to uAPI Tingmao Wang
2026-01-29 21:27   ` Mickaël Salaün
2025-12-30 17:20 ` [PATCH v2 2/6] landlock: Implement LANDLOCK_SCOPE_PATHNAME_UNIX_SOCKET Tingmao Wang
2026-01-29 21:27   ` Mickaël Salaün
2025-12-30 17:20 ` [PATCH v2 3/6] samples/landlock: Support LANDLOCK_SCOPE_PATHNAME_UNIX_SOCKET Tingmao Wang
2026-01-29 21:27   ` Mickaël Salaün
2026-01-31 17:48     ` Tingmao Wang
2026-02-02 20:14       ` Mickaël Salaün
2025-12-30 17:20 ` [PATCH v2 4/6] selftests/landlock: Support pathname socket path in set_unix_address Tingmao Wang
2025-12-30 17:20 ` [PATCH v2 5/6] selftests/landlock: Repurpose scoped_abstract_unix_test.c for pathname sockets too Tingmao Wang
2026-01-29 21:28   ` Mickaël Salaün
2026-02-02  0:06     ` Tingmao Wang
2025-12-30 17:20 ` [PATCH v2 6/6] selftests/landlock: Add pathname socket variants for more tests Tingmao Wang
2026-01-29 21:28   ` Mickaël Salaün
2025-12-30 23:16 ` [PATCH v2 0/6] Landlock: Implement scope control for pathname Unix sockets Günther Noack
2025-12-31 16:54   ` Demi Marie Obenour
2026-01-09 12:01     ` Mickaël Salaün
2026-01-31 17:41       ` Tingmao Wang
2026-02-02 20:32         ` Mickaël Salaün
2026-02-02 22:03           ` Justin Suess
2026-02-03  1:26             ` Tingmao Wang
2026-02-03 17:54               ` Günther Noack
2026-02-03 21:53                 ` Tingmao Wang
2026-02-04 11:44                   ` Günther Noack
2026-02-04 16:36                     ` Justin Suess
2026-02-04 18:28                       ` Mickaël Salaün
2026-02-05 15:22                         ` Justin Suess
     [not found]                         ` <44d216aa-9680-4cf5-bbf0-173869111212@gmail.com>
2026-02-05 19:15                           ` Mickaël Salaün
2026-02-08  2:57                             ` Tingmao Wang
2026-02-08 13:44                               ` Günther Noack
2026-02-08 13:49                               ` Günther Noack [this message]
2026-02-04 17:43                     ` Mickaël Salaün
2026-02-05  8:02                       ` Günther Noack
2026-02-05 10:27                         ` Mickaël Salaün
2026-02-08  2:57                           ` Tingmao Wang
2026-02-08 20:37                             ` Günther Noack
2026-02-08 20:48                               ` Tingmao Wang
2026-02-08 23:21                                 ` Günther Noack
2026-02-09 20:20                                 ` Mickaël Salaün
2026-02-04 17:39               ` Mickaël Salaün

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=20260208.b25c4105bc03@gnoack.org \
    --to=gnoack3000@gmail.com \
    --cc=demiobenour@gmail.com \
    --cc=fahimitahera@gmail.com \
    --cc=gnoack@google.com \
    --cc=hi@alyssa.is \
    --cc=jannh@google.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=m@maowtm.org \
    --cc=matthieu@buffet.re \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.