|
|
Message-ID: <20261129025006.GY5716@brightrain.aerifal.cx> Date: Sat, 28 Nov 2026 21:50:06 -0500 From: Rich Felker <dalias@...c.org> To: Thorsten Glaser <tg@...bsd.de> Cc: musl@...ts.openwall.com Subject: Re: musl: stub resolver queries from an unconnected UDP socket are poisonable off-path on Linux 7.1+ On Sun, Nov 29, 2026 at 03:01:21AM +0100, Thorsten Glaser wrote: > On Sat, 28 Nov 2026, Rich Felker wrote: > > >In general the rp_filter sysctl, on by default for all > >interfaces since at least the Linux 2.4 era, prevents any interface > >from receiving packets where the source address would not be routable > >to that interface if used as an outgoing destination address. > > On by default? > > $ grep . /proc/sys/net/ipv4/conf/*/rp_filter > /proc/sys/net/ipv4/conf/all/rp_filter:0 > /proc/sys/net/ipv4/conf/default/rp_filter:0 > /proc/sys/net/ipv4/conf/eth0/rp_filter:0 > /proc/sys/net/ipv4/conf/lo/rp_filter:0 > /proc/sys/net/ipv4/conf/wlan0/rp_filter:0 > > It’s not, even the docs say: Indeed, most distros do this and lots of bad online material says rp_filter is 1 by default, but it's not. However, there's actually a narrower defense, accept_local, that *is* 0 by default. If accept_local is 0, the interface will not accept packets that have a source address matching any local address. This at least prevents spoofing 127.0.0.1. I'm not sure if it prevents spoofing 127.0.0.2, etc., which could matter if you're using a non-default local address for your nameserver. There may be yet another layer of preventing packets spoofed from 127.0.0.0/8 elsewhere; I'm not sure. route_localnet may govern this. > | Default value is 0. Note that some distributions enable it in startup > | scripts. > > Even OpenBSD does not enable it by default, but with a simple > pf.conf line (“antispoof for lo0”), with the caveat that this > also blocks traffic for local addresses of other interfaces > being sent over the loopback interface. > > I think this calls for some actual testing… Yes. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.