lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvbK_e+JCeM9cn0Qd7JG5UdSO_-s8w5r0v40E485JevkbH4XQ@mail.gmail.com>
Date: Thu, 29 Feb 2024 18:25:46 -0500
From: Xin Long <lucien.xin@...il.com>
To: Jakub Sitnicki <jakub@...udflare.com>
Cc: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net, netdev@...r.kernel.org, 
	edumazet@...gle.com, pabeni@...hat.com, shuah@...nel.org, 
	linux-kselftest@...r.kernel.org, mic@...ikod.net, 
	linux-security-module@...r.kernel.org, keescook@...omium.org, 
	Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCH v4 12/12] selftests: ip_local_port_range: use XFAIL
 instead of SKIP

On Thu, Feb 29, 2024 at 3:27 PM Jakub Sitnicki <jakub@...udflare.com> wrote:
>
> On Wed, Feb 28, 2024 at 04:59 PM -08, Jakub Kicinski wrote:
> > SCTP does not support IP_LOCAL_PORT_RANGE and we know it,
> > so use XFAIL instead of SKIP.
> >
> > Reviewed-by: Kees Cook <keescook@...omium.org>
> > Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> > ---
> >  tools/testing/selftests/net/ip_local_port_range.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/testing/selftests/net/ip_local_port_range.c b/tools/testing/selftests/net/ip_local_port_range.c
> > index 6ebd58869a63..193b82745fd8 100644
> > --- a/tools/testing/selftests/net/ip_local_port_range.c
> > +++ b/tools/testing/selftests/net/ip_local_port_range.c
> > @@ -365,9 +365,6 @@ TEST_F(ip_local_port_range, late_bind)
> >       __u32 range;
> >       __u16 port;
> >
> > -     if (variant->so_protocol == IPPROTO_SCTP)
> > -             SKIP(return, "SCTP doesn't support IP_BIND_ADDRESS_NO_PORT");
> > -
> >       fd = socket(variant->so_domain, variant->so_type, 0);
> >       ASSERT_GE(fd, 0) TH_LOG("socket failed");
> >
> > @@ -414,6 +411,9 @@ TEST_F(ip_local_port_range, late_bind)
> >       ASSERT_TRUE(!err) TH_LOG("close failed");
> >  }
> >
> > +XFAIL_ADD(ip_local_port_range, ip4_stcp, late_bind);
> > +XFAIL_ADD(ip_local_port_range, ip6_stcp, late_bind);
> > +
> >  TEST_F(ip_local_port_range, get_port_range)
> >  {
> >       __u16 lo, hi;
>
> [wrt our earlier discussion off-list]
>
> You were right, this test succeeds if I delete SKIP for SCTP.
> Turns out IP_LOCAL_PORT_RANGE works for SCTP out of the box after all.
>
> What I didn't notice earlier is that sctp_setsockopt() delegates to
> ip_setsockopt() when level != SOL_SCTP.
>
> CC'ing Marcelo & Xin, to confirm that this isn't a problem.
Yes, SCTP supports ip_local_port_range by calling
inet_sk_get_local_port_range() in sctp_get_port(), similar to TCP/UDP.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ