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: <20250825155630.5848c357@kernel.org>
Date: Mon, 25 Aug 2025 15:56:30 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Oscar Maes <oscmaes92@...il.com>
Cc: bacs@...recast.net, brett@...recast.net, davem@...emloft.net,
 dsahern@...nel.org, netdev@...r.kernel.org, regressions@...ts.linux.dev,
 stable@...r.kernel.org
Subject: Re: [PATCH net 1/2] net: ipv4: fix regression in local-broadcast
 routes

On Mon, 25 Aug 2025 08:09:17 +0200 Oscar Maes wrote:
> Commit 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
> introduced a regression where local-broadcast packets would have their
> gateway set in __mkroute_output, which was caused by fi = NULL being
> removed.
> 
> Fix this by resetting the fib_info for local-broadcast packets.

Meaning that 9e30ecf23b1b would still change behavior for the subnet
broadcast address?

> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index f639a2ae881a..98d237e3ec04 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -2575,9 +2575,12 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
>  		    !netif_is_l3_master(dev_out))
>  			return ERR_PTR(-EINVAL);
>  
> -	if (ipv4_is_lbcast(fl4->daddr))
> +	if (ipv4_is_lbcast(fl4->daddr)) {
>  		type = RTN_BROADCAST;
> -	else if (ipv4_is_multicast(fl4->daddr))
> +
> +		/* reset fi to prevent gateway resolution */
> +		fi = NULL;
> +	} else if (ipv4_is_multicast(fl4->daddr))
>  		type = RTN_MULTICAST;
>  	else if (ipv4_is_zeronet(fl4->daddr))
>  		return ERR_PTR(-EINVAL);

nit: please add curly braces around all branches of this if / else if /
else ladder, per kernel coding style guide.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ