Charging my cellphone through usb breaks internet connection.

Bug #1879211 reported by Tomás Zubiri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Expired
Low
Unassigned

Bug Description

I don't know what package is responsible for this. I entered iptables because the ip command was not recognized as a package.

I use the ip route to debug internet problems. Here it is before plugging my cellphone through usb:
#ip route
default via 192.168.0.1 dev wlp2s0 proto dhcp metric 600
25.0.0.0/8 dev ham0 proto kernel scope link src 25.69.248.65
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
192.168.0.0/24 dev wlp2s0 proto kernel scope link src 192.168.0.51 metric 600
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown

Here it is after I plug my cellphone
#ip route
default via 192.168.42.129 dev enp0s20f0u1 proto dhcp metric 100
default via 192.168.0.1 dev wlp2s0 proto dhcp metric 600
25.0.0.0/8 dev ham0 proto kernel scope link src 25.69.248.65
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
192.168.0.0/24 dev wlp2s0 proto kernel scope link src 192.168.0.51 metric 600
192.168.42.0/24 dev enp0s20f0u1 proto kernel scope link src 192.168.42.114 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown

So my computer is trying to access all ips using my cellphone as a router, which of course fails.

the command "sudo ip route del default" followed by "sudo ip route add default via 192.168.0.1 dev wlp2s0" restores my connection.

Thank you for your attention. I'm available to answer any questions and fix this bug. Reporting this bug was already effort diverted from my other tasks, so let's make this count no matter how deep it cuts.

P.S: I went ahead and marked this bug as a security vulnerability because I can think of ways this can be exploited, especially if the cellphone can trigger the bug and route traffic so that the user doesn't suspect it. If you feel the security impact is small and that there are other more important security issues, feel free to unmark it and we can deal with it's usability impact, which is probably more impactful.

Regards,
Tomás.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: iptables 1.6.1-2ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-99.100-generic 4.15.18
Uname: Linux 4.15.0-99-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.14
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun May 17 22:59:02 2020
InstallationDate: Installed on 2019-02-08 (464 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: iptables
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tomás Zubiri (tzubiri) wrote :
Revision history for this message
Alex Murray (alexmurray) wrote :

This doesn't seem like a security issue to me - I believe this is the default behaviour when using network manager for tethering - it will route traffic via the tethered device. I am reassigning this against network-manager which is likely doing the route setup.

information type: Private Security → Public
affects: iptables (Ubuntu) → network-manager (Ubuntu)
Revision history for this message
Alex Murray (alexmurray) wrote :

One more thing - I expect your phone has USB Tethering enabled - and so presents itself as an rndis USB/ethernet device - and then network manager uses this as a preferred interface to route traffic through rather than the wireless interface.

Changed in network-manager (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Tomás Zubiri (tzubiri) wrote :

Sensible. If that were the case, a solution would rely in the capacity of the network manager to detect that the new route does not work,(and that the previous one did)

My naïve solution would be to ping a reliable server (I use 8.8.8.8) and delete the new route if it timesout.

Additionally, if the new cabled connection were successful initially, but later stopped working, shouldn't the network fallback to the previous connection? A similar thing already happens when multiple dns servers are specified.

2 functionalities failed for this bug to occur. (a third one if you count my phone presenting itself as a router when it can't do that, but that's not within Ubuntu's jurisdiction... is it?)

Revision history for this message
Tomás Zubiri (tzubiri) wrote :

@AlexMurray

Genuine question. Does this mean that I shouldn't connect untrusted usb devices to my computer because it can unilaterally decide to snoop my traffic? So far my understanding has been that usb devices cannot run arbitrary programs and are thus safe to connect, with the exception of specific security exploits.
This counters my expectations because a usb device would not need to rely on an exploit to compromise my computer, just legitimately use a feature.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for network-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in network-manager (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.