Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20261129012703.GW5716@brightrain.aerifal.cx>
Date: Sat, 28 Nov 2026 20:27:03 -0500
From: Rich Felker <dalias@...hyderm.io>
To: Markus Wichmann <nullplan@....net>
Cc: musl@...ts.openwall.com, X L <idealeer521@...il.com>
Subject: Re: musl: stub resolver queries from an unconnected UDP
 socket are poisonable off-path on Linux 7.1+

On Sat, Nov 28, 2026 at 06:49:08PM +0100, Markus Wichmann wrote:
> Hi,
> 
> so if I understand correctly,

You don't.

> the problem is that an attacker that
> guesses the ephemeral port and transaction ID right and spoofs the
> source address can poison the response.
> 
> This is bad. It means that the standard defense of "just use resolvers
> you trust, and that have network paths that you trust" doesn't work
> here. If I set the nameserver to 127.0.0.1 (which should have a trusted
> network path by definition, since it's localhost), an external attacker
> can still spit in my soup. And the suggested fix of using connected
> sockets only hinders an attacker's ability to figure out the port. If
> they just send random DNS responses to random ports, they will get lucky
> at some point.

No, you cannot spoof 127.0.0.0/8 unless the host is horribly
misconfigured. 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.

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.