tailscale / tailscale/tailscale

macos: restarting GUI app while tailscale is disconnected leaks a tun interface

Open
#20,803 0 comments 0 reactions 0 assignees View on GitHub
bug OS-macos
Dominant language
Go
Stars
36.5k
Forks
3.2k
Avg merge
1d 23h
Merged PRs (30d)
132

Description

### What is the issue?

Restarting the Tailscale GUI/menubar app on macos (network extension variant) while Tailscale is _disconnected_ leads to the creation of a new tun interface each time the GUI is started. This does not reproduce if Tailscale is connected when the GUI is restarted.

I repro'd this on two machines, one on stable (1.102.2) and other unstable (1.103.72)

```
$ ifconfig | grep utun | grep -c mtu
9
# restart gui
$ ifconfig | grep utun | grep -c mtu
10
# restart gui
$ ifconfig | grep utun | grep -c mtu
11
```

### Steps to reproduce

1. Disable Tailscale toggle in macos menubar
2. `ifconfig | grep utun | grep -c mtu`
3. Quit Tailscale from macos menubar
4. Open Tailscale again
5. `ifconfig | grep utun | grep -c mtu`

### Are there any recent changes that introduced the issue?

_No response_

### OS

macOS

### OS version

26.5.2, 26.5.1

### Tailscale version

1.102.2, 1.103.72

### Other software

_No response_

### Bug report

stable: `BUG-0b1ae8a6012765ea2073397b11afd60d1f7c32becc57ce0be59e4bcd08d57a0c-20260810044620Z-f1030233d00f0a2a`

unstable: `BUG-0ed9a5dd8b7e4b934aebf17862dc43e54f374d6698cbab940d4bce2e37243ca8-20260810175027Z-9eee9818d3d912ad`

Contributor guide

Open the contributing guide

Research direction

Reproduce the leak with the macOS menubar GUI, the disconnected Tailscale state, and the two ifconfig commands described in the issue. Trace the macOS network-extension lifecycle across quitting and reopening the GUI; done means repeated restarts while disconnected no longer increase the utun count, while the connected case remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, macos
Domain
desktop, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.