Privacy: device ID -> IP tracking via discovery

I think your proposal has merit, even though it complicates things a bit.

Can it though? I was under the impression the keys were get only, no search over the DHT protocol. (The DHT nodes themselves can of course be iterated, so you can trivially get a set of IPs of devices running Syncthing, but that’s the way of a DHT…)

Yup. That’s the reason why I recommended an opt-in approach for Syncthing to participate as a full DHT node instead of just acting as client.

That would get us down to evil nodes.

Our biggest problem is that an attacker can simply operate a node, connect back to the client IP on 22000/tcp and extract the certificate. After that he only needs to connect the dots. This is even simpler for full nodes as they add themselves to the routing table of the DHT.

These issues are entirely orthogonal to what we actually store in the DHT though, since they are effectively just “an evil node can join the DHT, see other DHT nodes, scan them”. That said, I can scan port 22000 on the entire IPv4 internet in minutes today, so again I’m not certain that the attack is relevant even if it’s possible.

It’s also annoying that this is literally the second most requested feature for a decade, and now here we are with a “do we event want this” style discussion. I’ll add a point of context to it: current global discovery does not scale and needs either rearchitecting or replacing. Imagine global discovery servers are shutting down 2026-12-31 23:59:59; let’s look at what’s a practical replacement that is more decentralised, as requested…

1 Like

100% in my case :sweat_smile:

After reviewing all the variants discussed, I always come to the same conclusion: we cannot fully defend against malicious nodes. To do so would require us to introduce an out-of-band secret, which would completely break the way things work today. I think we should stop there, though, to avoid making the network susceptible to DoS attacks.

However, hashing the device ID is still an improvement, as it limits the leak to the storage layer instead of exposing it to all nodes involved in PUT/GET operations.

If you are a security conscious user, the alternative has always been, and will always be, to run your own infrastructure in terms of a discovery server or DHT.

( @calmh sorry for wasting your time. My verdict mostly turns back the clock to the initial proposal :slightly_frowning_face: )

2 Likes

I rebooted this discussion with an actual design doc to discuss, which will form the basis for the documentation on the docs site.

1 Like