Warnung: Android leakt beim Connectivity-Check Daten an VPN-Verbindungen vorbei

Aktuell prüfe ich für die Artikelserie »Custom-ROMs« gerade das Datensendeverhalten bekannter Android-ROMs. Dabei ist mir etwas aufgefallen, was ich nachfolgend kurz erläutern möchte: Android leakt nämlich Daten an einer VPN-Verbindung vorbei.

Bereits während des Boot-Vorgangs führt Android (13) einen Captive-Portal-Check durch, sofern ein Netzwerkinterface (WiFi, Mobile) aktiv ist. Wird das Gerät in der Zwischenzeit in den Flugmodus versetzt und danach wieder eine Netzwerkschnittstelle aktiviert, wird erneut ein Captive-Portal-Check initiiert. Das bedeutet erneut ein Verbindungsaufbau zu connectivitycheck.gstatic.com bzw. www.google.com. Was dabei auffällt: Beide Verbindungen werden nicht durch das VPN getunnelt, sondern werden einfach daran vorbeigeführt. Das hat mich stutzig gemacht, denn selbst wenn bei der VPN-Verbindung die Option Verbindungen ohne VPN blockieren aktiv ist, wird der Captive-Portal-Check einfach am VPN vorbeigetunnelt. Android leakt also Traffic, was nicht nur die VPN-Option infrage stellt, sondern ein echtes Problem hinsichtlich der Privatsphäre sein kann. Wenn einfach Daten an einem VPN-Tunnel vorbeigeschleust werden können, dann ist die Implementierung fragwürdig.

Das Problem scheint übrigens nicht neu zu sein. Mullvad VPN hatte darüber bereits im Oktober 2022 berichtet: Android leaks connectivity check traffic.

Offenbar wird Google an diesem Verhalten allerdings nichts ändern. Ein dazu eingereichtes Issue hat den Status Won't Fix (Intended Behavior). Begründet wird das wie folgt:

We have looked into the feature request you have reported and would like to inform you that this is working as intended. We do not think such an option would be understandable by most users, so we don’t think there is a strong case for offering this.

As for disabling connectivity checks :

  • the VPN might be actually relying on the result of these connectivity checks (they are available through public APIs).
  • the VPN may be a split tunnel, letting part of the traffic over the underlying network, or only affect a given set of apps. In both these cases, the connectivity checks are still necessary for smooth operation of all the legitimate traffic that doesn’t go over the VPN.
  • the connectivity checks are far from the only thing exempted from the VPN ; privileged apps can also bypass the VPN and this is necessary for their operation in many cases. An example is IWLAN, or tethering traffic.
  • it’s unclear to us what specific privacy impact is meant. The connectivity checks reveal there is an Android device at this address, which is plenty clear from the L2 connection and from the traffic going over the VPN anyway.

VPN-Leak beheben

CalyxOS: Unter CalyxOS könnt ihr diesen Leak wie folgt beheben: Sobald das Häkchen unter »Einstellungen -> Netzwerk & Internet -> Verbindungsprüfung« entfernt ist, nimmt CalyxOS keine Verbindungen mehr zu www.google.com bzw. connectivitycheck.gstatic.com auf. Die Entfernung des Häkchens bedeutet allerdings auch, dass Captive-Portals dann nicht (immer) zuverlässig erkannt werden können. Es bedeutet aber auch: Keine VPN-Leaks mehr.

GrapheneOS: Ähnlich ist es bei GrapheneOS. Dort könnt ihr über »Einstellungen -> Netzwerk & Internet -> Internet connectivity check« den Captive-Portal-Check ebenfalls deaktivieren.

Also: Wer nicht selbst tätig wird, der wird mit diesem VPN-Leak wohl leben müssen. Weitere Infos zur (vollständigen) Deaktivierung des Captive-Portal-Checks für Android findet ihr hier: Android: Captive-Portal.

Hilf mit die Spendenziele zu erreichen! Mitmachen ➡