[pkg-apparmor] Bug#1156207: apparmor: wg profile denies wireguard-go UAPI socket (wg-quick userspace fallback broken)

L A andychiang_git at outlook.com
Wed Dec 2 23:11:39 GMT 2026


Package: apparmor
Version: 5.0.2-6
Severity: normal

Dear Maintainer,

The "wg" profile in 5.0.2-6 and 5.0.2-8 (4.1.8-3 does not ship it) does
not allow wg to talk to the wireguard-go UAPI socket, which breaks
wg-quick's userspace fallback.

Steps to reproduce:
1. Use a system where the WireGuard kernel module is unavailable (here it
   is blacklisted via /etc/modprobe.d/), with wireguard-tools installed and
   wireguard-go in PATH.
2. wg-quick up wg0
   -> "[#] wg addconf wg0 /dev/fd/63"
   -> "Unable to modify interface: Permission denied"
3. wg show
   -> "Unable to list interfaces: Permission denied"

Kernel log:
apparmor="DENIED" operation="connect" class="file" profile="wg"
name="/run/wireguard/wg0.sock" comm="wg" requested_mask="wr" denied_mask="wr"

wg talks to wireguard-go over /run/wireguard/<ifname>.sock. Commands that
name an interface (as used by wg-quick up) need access to the socket.
"wg show" without an interface name additionally has to read the
/run/wireguard/ directory.

I have not tested 5.0.2-8, but the "wg" profile text there is identical
to 5.0.2-6.

Suggested addition to profiles/apparmor.d/wg:

  # wireguard-go userspace implementation (UAPI socket)
  file r @{run}/wireguard/,
  file rw @{run}/wireguard/*.sock,


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 7.3.6+deb14-cloud-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apparmor depends on:
ii  debconf [debconf-2.0]  1.5.92
ii  libapparmor1           5.0.2-6
ii  libc6                  2.43-7
ii  libgcc-s1              16.2.0-5
ii  libstdc++6             16.2.0-5
ii  libzstd1               1.5.7+dfsg-4

apparmor recommends no packages.

Versions of packages apparmor suggests:
pn  apparmor-utils  <none>

-- debconf information excluded
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-apparmor-team/attachments/20261202/94c9bd7e/attachment.htm>


More information about the pkg-apparmor-team mailing list