lkml.org 
[lkml]   [2021]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] sctp: initialize endpoint LSM labels also on the client side
On Thu, Oct 21, 2021 at 11:55 PM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> On Thu, Oct 21, 2021 at 05:38:46PM +0200, Ondrej Mosnacek wrote:
> > The secid* fields in struct sctp_endpoint are used to initialize the
> > labels of a peeloff socket created from the given association. Currently
> > they are initialized properly when a new association is created on the
> > server side (upon receiving an INIT packet), but not on the client side.
>
> +Cc Xin
Thanks Marcelo,

security_sctp_assoc_request() is not supposed to call on the client side,
as we can see on TCP. The client side's labels should be set to the
connection by selinux_inet_conn_request(). But we can't do it based
on the current hooks.

The root problem is that the current hooks incorrectly treat sctp_endpoint
in SCTP as request_sock in TCP, while it should've been sctp_association.
We need a bigger change on the current security sctp code.

I will post the patch series in hand, please take a look.

\
 
 \ /
  Last update: 2021-10-22 08:33    [W:0.058 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site