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: <20250825060229-oscmaes92@gmail.com>
Date: Mon, 25 Aug 2025 08:02:29 +0200
From: Oscar Maes <oscmaes92@...il.com>
To: Brett Sheffield <brett@...recast.net>,
	Brett A C Sheffield <bacs@...recast.net>,
	Jakub Kicinski <kuba@...nel.org>
Cc: regressions@...ts.linux.dev, netdev@...r.kernel.org,
	stable@...r.kernel.org, davem@...emloft.net, dsahern@...nel.org
Subject: Re: [REGRESSION][BISECTED][PATCH] net: ipv4: fix regression in
 broadcast routes

On Sat, Aug 23, 2025 at 02:24:39PM +0200, Brett Sheffield wrote:
> On 2025-08-22 18:32, Jakub Kicinski wrote:
> > Thanks for bisecting and fixing!
> > 
> > > The broadcast_pmtu.sh selftest provided with the original patch still
> > > passes with this patch applied.
> > 
> > Hm, yes, AFACT we're losing PMTU discovery but perhaps original commit
> > wasn't concerned with that. Hopefully Oscar can comment.
> 
> Indeed. This takes it back to the previous behaviour.
> 
> > On Fri, 22 Aug 2025 16:50:51 +0000 Brett A C Sheffield wrote:
> > > +		if (type == RTN_BROADCAST) {
> > > +			/* ensure MTU value for broadcast routes is retained */
> > > +			ip_dst_init_metrics(&rth->dst, res->fi->fib_metrics);
> > 
> > You need to check if res->fi is actually set before using it
> 
> Ah, yes.  Fixed.
> 
> > Could you add a selftest / test case for the scenario we broke?
> > selftests can be in C / bash / Python. If bash hopefully socat
> > can be used to repro, cause it looks like wakeonlan is not very
> > widely packaged.
> 
> Self-test added using socat as requested. If you want this wrapped in namespaces
> etc. let me know. I started doing that, but decided a simpler test without
> requiring root was better and cleaner.
> 
> Thanks for the review Jakub.  v2 patches sent.
> 
> Cheers,
> 
> 
> Brett
> -- 
> Brett Sheffield (he/him)
> Librecast - Decentralising the Internet with Multicast
> https://librecast.net/
> https://blog.brettsheffield.com/

Replying to you both.

I missed this regression when I tested the blamed commit. Glad this surfaced quickly.

Just to clarify, the issue isn't that the destination address is "mangled".
The removal of fi = NULL inadvertently causes a gateway to be assigned to
local broadcast packets (see the call to rt_set_nexthop), which results in the
observed regression. __mkroute_output is still correct for directed broadcast packets
due to them having their own routes in the local table. The regression can easily be
fixed by setting the fib info to NULL for lbcast packets.

The submitted selftest only fails if a default gateway is configured, but does not
set one up. I'll submit my own patches to fix the regression and improve the
selftest shortly.

Oscar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ