| ▲ | ValdikSS 3 hours ago | |
Android has a way to bind the socket to the interface: Network.bindSocket, this is a setsockopt(SO_BINDTODEVICE) wrapper with access control. The access to it is controlled by the VPN application. Some applications could be allowed to connect directly when the VPN is active and routing all the traffic by default, some could use VPN if configured not to use it by default. However starting with Linux kernel 5.7, the unprivileged userspace can now call setsockopt(SO_BINDTODEVICE) directly and use VPN or non-VPN interface even if restricted by the VPN client. Not fixed in any Android (incl. Graphene, which has fixes for other leaks, but not this) to the day. PoC is as simple as "curl --interface [ifname, not IP] ifconfig.co" in termux. | ||