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]
Date: Tue, 17 Oct 2023 11:16:56 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, borisp@...dia.com, john.fastabend@...il.com
Subject: Re: [PATCH net-next 08/14] tls: also use init_prot_info in
 tls_set_device_offload

2023-10-13, 14:23:07 -0700, Jakub Kicinski wrote:
> On Mon,  9 Oct 2023 22:50:48 +0200 Sabrina Dubroca wrote:
> > +	if (mode == TLS_HW) {
> > +		prot->aad_size = 0;
> > +		prot->tail_size = 0;
> > +	}
> 
> Strange, tail_size doesn't matter because HW doesn't support TLS 1.3
> but aad_size?  Is it overwritten by SW init or something?

For RX, yes, tls_set_device_offload_rx -> tls_set_sw_offload ->
  init_prot_info(mode=TLS_SW).
But aad_size is not used in tls_device_reencrypt, maybe because (for
both GCM variants)
    TLS_HEADER_SIZE + cipher_desc->iv == TLS_AAD_SPACE_SIZE

For TX, it looks like tls_device_fallback hardcodes TLS_AAD_SPACE_SIZE
where tls_sw would use prot->aad_size. tls_device doesn't use either.

Actually this patch is broken. If we set TLS_RX to TLS_SW first (for
example because we disabled tls-hw-rx-offload with ethtool), and
TLS_TX to TLS_HW second, that will set aad_size to 0, but RX needs it
to be set.

I'll send a fix to drop this hunk completely. Thanks for reviewing.

-- 
Sabrina


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ