Re: [PATCH net] net/x25: inherit the listening socket's security label on accept

From: Paul Moore

Date: Tue Nov 24 2026 - 12:12:50 EST


On Mon, Nov 23, 2026 at 11:44 AM Martin Schiller <ms@xxxxxxxxxx> wrote:
>
> On Mon, 23 Nov 2026 01:31:20 +0100, Suyuan Wang wrote:
> > x25_make_new() creates the socket that accept() returns by copying
> > fields from the listening socket, but it never clones the listening
> > socket's LSM security state -- there is no security_sk_clone(osk, sk).
>
> Thanks!
>
> Acked-by: Martin Schiller <ms@xxxxxxxxxx>

My apologies, but I'm about as X.25 ignorant as possible, so a quick
question: the x25_make_new() function is called by
x25_rx_call_request(), which as far as I can tell is on pretty
analogous to an accept() operation, is that correct?

If that's the case (x25_rx_call_request() acting similar to accept()),
cloning the listening socket's LSM data makes sense, but if it's
something else we may want to leave the new socket as-is, labeled by
the process performing the operation.

--
paul-moore.com