Re: [PATCH] selinux: check length properly in SCTP bind hook

2018-11-13 Thread Paul Moore
On Tue, Nov 13, 2018 at 2:20 PM Qian Cai wrote: > On Tue, 2018-11-13 at 16:16 +0100, Ondrej Mosnacek wrote: > > selinux_sctp_bind_connect() must verify if the address buffer has > > sufficient length before accessing the 'sa_family' field. See > > __sctp_connect() for a similar check. > > > > The

Re: [PATCH] selinux: check length properly in SCTP bind hook

2018-11-13 Thread Qian Cai
On Tue, 2018-11-13 at 16:16 +0100, Ondrej Mosnacek wrote: > selinux_sctp_bind_connect() must verify if the address buffer has > sufficient length before accessing the 'sa_family' field. See > __sctp_connect() for a similar check. > > The length of the whole address ('len') is already checked in th

Re: [PATCH] selinux: check length properly in SCTP bind hook

2018-11-13 Thread Paul Moore
On Tue, Nov 13, 2018 at 10:18 AM Ondrej Mosnacek wrote: > > selinux_sctp_bind_connect() must verify if the address buffer has > sufficient length before accessing the 'sa_family' field. See > __sctp_connect() for a similar check. > > The length of the whole address ('len') is already checked in th

[PATCH] selinux: check length properly in SCTP bind hook

2018-11-13 Thread Ondrej Mosnacek
selinux_sctp_bind_connect() must verify if the address buffer has sufficient length before accessing the 'sa_family' field. See __sctp_connect() for a similar check. The length of the whole address ('len') is already checked in the callees. Reported-by: Qian Cai Fixes: d452930fd3b9 ("selinux: Ad