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: <20250828073119.62cb3545@kernel.org>
Date: Thu, 28 Aug 2025 07:31:19 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 06/13] macsec: use NLA_UINT for
 MACSEC_SA_ATTR_PN

On Thu, 28 Aug 2025 16:25:42 +0200 Sabrina Dubroca wrote:
> 2025-08-27, 18:55:40 -0700, Jakub Kicinski wrote:
> > On Wed, 27 Aug 2025 18:54:15 -0700 Jakub Kicinski wrote:  
> > > On Tue, 26 Aug 2025 15:16:24 +0200 Sabrina Dubroca wrote:  
> > > I think this is a slight functional change on big endian.
> > > I suppose we don't care..  
> > 
> > we don't care == the change is not intentional, so in the unlikely case
> > BE users exist aligning with LE is better in the first place.  
> 
> I don't think this is changing the behavior. The previous check was
> copying whatever bytes were in the attribute into a u64 (incorrectly
> on BE) and setting the rest to 0, and then checking that this u64 is
> != 0. The new check is reading the value correctly and also checking
> that it's != 0.
> 
> Converting the nla_get_u64(MACSEC_SA_ATTR_PN) in
> macsec_{add,upd}_{rx,tx}sa to get_uint would change the behavior on
> BE, but the current code hasn't worked correctly since XPN was
> introduced? We use 1<<32 instead of 1 as our PN, which doesn't make
> sense when using 32bit PNs. So I think we'll want to change all the
> nla_get_u64(MACSEC_SA_ATTR_PN) into
> nla_get_uint(MACSEC_SA_ATTR_PN). WDYT?

Heh, TBH I misconstrued the patch, I thought you already did
switch to get_uint. I think switching makes sense, I don't think
anyone is expecting the difference in behavior between LE and BE.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ