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] [day] [month] [year] [list]
Message-ID: <4a83e2f526013516e2827a4ff8899b0437d08a25.camel@wdc.com>
Date: Thu, 25 Sep 2025 05:39:14 +0000
From: Wilfred Mallawa <wilfred.mallawa@....com>
To: "sd@...asysnail.net" <sd@...asysnail.net>
CC: "corbet@....net" <corbet@....net>, "davem@...emloft.net"
	<davem@...emloft.net>, "linux-kselftest@...r.kernel.org"
	<linux-kselftest@...r.kernel.org>, "john.fastabend@...il.com"
	<john.fastabend@...il.com>, "shuah@...nel.org" <shuah@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>, "horms@...nel.org" <horms@...nel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] net/tls: support maximum record size limit

On Wed, 2025-09-24 at 19:50 +0200, Sabrina Dubroca wrote:
> 
[...]
> > +
> >  static int do_tls_setsockopt(struct sock *sk, int optname,
> > sockptr_t optval,
> >  			     unsigned int optlen)
> >  {
> > @@ -833,6 +898,9 @@ static int do_tls_setsockopt(struct sock *sk,
> > int optname, sockptr_t optval,
> >  	case TLS_RX_EXPECT_NO_PAD:
> >  		rc = do_tls_setsockopt_no_pad(sk, optval, optlen);
> >  		break;
> > +	case TLS_TX_RECORD_SIZE_LIM:
> > +		rc = do_tls_setsockopt_tx_record_size(sk, optval,
> > optlen);
> 
> I think we want to lock the socket here, to avoid any concurrent
> send()?
> Especially now with the ->open_rec check.
> 
Yeah that's a good point, will fixup!
> 
> > @@ -1111,6 +1180,11 @@ static int tls_get_info(struct sock *sk,
> > struct sk_buff *skb, bool net_admin)
> >  			goto nla_failure;
> >  	}
> >  
> > +	err = nla_put_u16(skb, TLS_INFO_TX_RECORD_SIZE_LIM,
> > +			  ctx->tx_record_size_limit);
> 
> I'm not sure here: if we do the +1 adjustment we'd be consistent with
> the value reported by getsockopt, but OTOH users may get confused
> about seeing a value larger than TLS_MAX_PAYLOAD_SIZE.
Makes sense to keep the behaviour the same as getsockopt() right? So
add the +1 changes here based on version (same as getsockopt()). In
which case, it should never exceed TLS_MAX_PAYLOAD_SIZE.

Regards,
Wilfred

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ