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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023120203-fracture-wieldable-484b@gregkh>
Date: Sat, 2 Dec 2023 00:02:15 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org,
	"The UK's National Cyber Security Centre (NCSC)" <security@...c.gov.uk>,
	Willem de Bruijn <willemdebruijn.kernel@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>, stable@...nel.org
Subject: Re: [PATCH net v2] packet: Move reference count in packet_sock to
 atomic_long_t

On Fri, Dec 01, 2023 at 02:10:21PM +0100, Daniel Borkmann wrote:
> In some potential instances the reference count on struct packet_sock
> could be saturated and cause overflows which gets the kernel a bit
> confused. To prevent this, move to a 64-bit atomic reference count on
> 64-bit architectures to prevent the possibility of this type to overflow.
> 
> Because we can not handle saturation, using refcount_t is not possible
> in this place. Maybe someday in the future if it changes it could be
> used. Also, instead of using plain atomic64_t, use atomic_long_t instead.
> 32-bit machines tend to be memory-limited (i.e. anything that increases
> a reference uses so much memory that you can't actually get to 2**32
> references). 32-bit architectures also tend to have serious problems
> with 64-bit atomics. Hence, atomic_long_t is the more natural solution.
> 
> Reported-by: "The UK's National Cyber Security Centre (NCSC)" <security@...c.gov.uk>
> Co-developed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: stable@...nel.org
> ---
>  [ No Fixes tag, needed for all currently maintained stable kernels. ]
> 
>  v1 -> v2:
>    - Switch from atomic64_t to atomic_long_t (Linus)

Thanks for changing this, looks good to me!

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ