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: <6569f5aa70747_138af529417@willemb.c.googlers.com.notmuch>
Date: Fri, 01 Dec 2023 10:03:06 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>, 
 netdev@...r.kernel.org
Cc: Daniel Borkmann <daniel@...earbox.net>, 
 "The UK's National Cyber Security Centre (NCSC)" <security@...c.gov.uk>, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 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

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)

Reviewed-by: Willem de Bruijn <willemb@...gle.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ