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-next>] [day] [month] [year] [list]
Message-Id: <20250127194024.3647-1-david.laight.linux@gmail.com>
Date: Mon, 27 Jan 2025 19:40:22 +0000
From: David Laight <david.laight.linux@...il.com>
To: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: David Laight <david.laight.linux@...il.com>,
	David Ahern <dsahern@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Tom Herbert <tom@...bertland.com>,
	Gabriel Krisman Bertazi <krisman@...e.de>,
	Lorenz Bauer <lmb@...valent.com>,
	Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: [PATCH net 0/2] udplookup: Rescan udp hash chains if cross-linked

udp_lib_rehash() can get called at any time and will move a
socket to a different hash2 chain.
This can cause udp[46]_lib_lookup2() (processing incoming UDP) to
fail to find a socket and an ICMP port unreachable be sent.

Prior to ca065d0cf80fa the lookup used 'hlist_nulls' and checked
that the 'end if list' marker was on the correct list.

The cross-linking can definitely happen (see earlier issues with
it looping forever because gcc cached the list head).

I can't see an easy way around adding another two parameters to
udp[46]_lib lookup().
However once udp-lite is removed 'mask' can be obtained from 'net'.
'net' itself could be obtained from 'sk'.

Not addressed here, but the 'reuseport' code doesn't look right to me.

David Laight (2):
  IPv4: Rescan the hash2 list if the hash chains have got cross-linked.
  IPv6: Rescan the hash2 list if the hash chains have got cross-linked.

 net/ipv4/udp.c | 19 +++++++++++++++++--
 net/ipv6/udp.c | 22 +++++++++++++++++++---
 2 files changed, 36 insertions(+), 5 deletions(-)

-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ