From: "Günther Noack" <gnoack@google.com>
To: Matthieu Buffet <matthieu@buffet.re>
Cc: "Mickaël Salaün" <mic@digikod.net>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] selftests/landlock: NULL-terminate unix pathname addresses
Date: Wed, 3 Dec 2025 10:48:45 +0100 [thread overview]
Message-ID: <aTAHfes90YxsXWt0@google.com> (raw)
In-Reply-To: <20251202215141.689986-1-matthieu@buffet.re>
On Tue, Dec 02, 2025 at 10:51:41PM +0100, Matthieu Buffet wrote:
> The size of Unix pathname addresses is computed in selftests using
> offsetof(struct sockaddr_un, sun_path) + strlen(xxx). It should have
> been that +1, which makes addresses passed to the libc and kernel
> non-NULL-terminated. unix_mkname_bsd() fixes that in Linux so there is
> no harm, but just using sizeof(the address struct) should improve
> readability.
>
> Signed-off-by: Matthieu Buffet <matthieu@buffet.re>
> ---
> [...]
Thank you very much, this looks good!
Reviewed-by: Günther Noack <gnoack@google.com>
—Günther
next prev parent reply other threads:[~2025-12-03 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 0:36 [PATCH] selftests/landlock: Remove invalid unix socket bind() Matthieu Buffet
2025-12-02 8:37 ` Günther Noack
2025-12-02 21:46 ` Matthieu Buffet
2025-12-02 21:51 ` [PATCH] selftests/landlock: NULL-terminate unix pathname addresses Matthieu Buffet
2025-12-03 9:48 ` Günther Noack [this message]
2025-12-19 20:26 ` 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=aTAHfes90YxsXWt0@google.com \
--to=gnoack@google.com \
--cc=linux-security-module@vger.kernel.org \
--cc=matthieu@buffet.re \
--cc=mic@digikod.net \
/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.