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

Paul Moore paul at paul-moore.com
Tue Nov 24 17:10:41 UTC 2026


On Mon, Nov 23, 2026 at 11:44 AM Martin Schiller <ms at dev.tdt.de> 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 at dev.tdt.de>

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



More information about the Linux-security-module-archive mailing list