[GH-ISSUE #3431] [Linux] AmneziaWG connection fails instantly: "hex string does not fit the slice" + daemon core dump (Mint 22.3, 5.1.0.6 & 5.0.3.0) #3297

Open
opened 2026-11-08 04:01:34 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kawoll1 on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3431

Description

Connecting via AmneziaWG (container amnezia-awg2) fails instantly: the UI shows
"Connecting" for ~1 second, then drops back to "Disconnected".
The daemon log shows a peer public key parsing error, after which the daemon
crashes with a core dump and is restarted by systemd.

The same server/config works fine on other family members' devices (non-Linux),
so the server side is OK.

Environment

  • OS: Linux Mint 22.3 (x86_64)
  • Client versions tested: 5.1.0.6 (ac175c8) and 5.0.3.0 (de93650) — same bug on both
  • Protocol: AmneziaWG (container amnezia-awg2)
  • Connection route mode: VpnOnlyForwardSites (site split tunneling also tested disabled — same result)
  • Daemon binary: /opt/AmneziaVPN/bin/AmneziaVPN-service (systemd unit AmneziaVPN.service)

Steps to reproduce

  1. Open AmneziaVPN
  2. Select server with AmneziaWG protocol
  3. Click Connect
  4. Connection drops after ~1 second

What was already tried (no effect)

  • Reinstalled the client (5.1.0.6 → 5.0.3.0)
  • Removed server profile and re-added it with a freshly issued config
  • Disabled site split tunneling completely
  • Wiped user config (~/.config/AmneziaVPN.ORG)
  • Restarted AmneziaVPN.service, rebooted the PC multiple times

Actual result

Interface amn0 is created, amneziawg-go starts, but peer configuration fails:
AmneziaVPN WireguardUtilsLinux : Created wireguard interface amn0
AmneziaVPN LinuxRouteMonitor : Adding exclusion route for /999999
AmneziaVPN LinuxRouteMonitor : Invalid destination prefix
AmneziaVPN WireguardGo : ERROR: (amn0) IPC error -22: failed to get peer by public key:
hex string does not fit the slice
AmneziaVPN WireguardUtilsLinux : Peer configuration failed: Unknown error -22
AmneziaVPN Daemon : Peer creation failed.
AmneziaVPN DaemonLocalServerConnection : Failed to activate the interface
malloc(): unsorted double linked list corrupted
AmneziaVPN.service: Main process exited, code=dumped, status=6/ABRT
AmneziaVPN.service: Failed with result 'core-dump'.
Note also the garbled peer key in the daemon log
(Configuring peer Ϯ⇈C5 via <server IP>) — looks like memory corruption
while parsing the peer public key, which then leads to the malloc() crash.

Expected result

AmneziaWG tunnel connects normally, as it does on other devices with the same server.

Additional info

The issue is specific to AmneziaWG — the daemon crashes during peer setup,
before any handshake, so this is not a network/provider block.

Originally created by @kawoll1 on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3431 ## Description Connecting via AmneziaWG (container `amnezia-awg2`) fails instantly: the UI shows "Connecting" for ~1 second, then drops back to "Disconnected". The daemon log shows a peer public key parsing error, after which the daemon crashes with a core dump and is restarted by systemd. The same server/config works fine on other family members' devices (non-Linux), so the server side is OK. ## Environment - OS: Linux Mint 22.3 (x86_64) - Client versions tested: 5.1.0.6 (ac175c8) and 5.0.3.0 (de93650) — same bug on both - Protocol: AmneziaWG (container `amnezia-awg2`) - Connection route mode: VpnOnlyForwardSites (site split tunneling also tested disabled — same result) - Daemon binary: /opt/AmneziaVPN/bin/AmneziaVPN-service (systemd unit AmneziaVPN.service) ## Steps to reproduce 1. Open AmneziaVPN 2. Select server with AmneziaWG protocol 3. Click Connect 4. Connection drops after ~1 second ## What was already tried (no effect) - Reinstalled the client (5.1.0.6 → 5.0.3.0) - Removed server profile and re-added it with a freshly issued config - Disabled site split tunneling completely - Wiped user config (~/.config/AmneziaVPN.ORG) - Restarted AmneziaVPN.service, rebooted the PC multiple times ## Actual result Interface `amn0` is created, `amneziawg-go` starts, but peer configuration fails: AmneziaVPN WireguardUtilsLinux : Created wireguard interface amn0 AmneziaVPN LinuxRouteMonitor : Adding exclusion route for /999999 AmneziaVPN LinuxRouteMonitor : Invalid destination prefix AmneziaVPN WireguardGo : ERROR: (amn0) IPC error -22: failed to get peer by public key: hex string does not fit the slice AmneziaVPN WireguardUtilsLinux : Peer configuration failed: Unknown error -22 AmneziaVPN Daemon : Peer creation failed. AmneziaVPN DaemonLocalServerConnection : Failed to activate the interface malloc(): unsorted double linked list corrupted AmneziaVPN.service: Main process exited, code=dumped, status=6/ABRT AmneziaVPN.service: Failed with result 'core-dump'. Note also the garbled peer key in the daemon log (`Configuring peer Ϯ⇈C5 via <server IP>`) — looks like memory corruption while parsing the peer public key, which then leads to the malloc() crash. ## Expected result AmneziaWG tunnel connects normally, as it does on other devices with the same server. ## Additional info The issue is specific to AmneziaWG — the daemon crashes during peer setup, before any handshake, so this is not a network/provider block.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3297
No description provided.