mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2026-10-14 05:41:54 +00:00
[GH-ISSUE #141] Zero-payload UDP packets during handshake #74
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-go#74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @orange-banal-pole on GitHub (May 25, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-go/issues/141
Originally assigned to: @ygurov on GitHub.
coalesceMessagesincorrectly emits empty UDP packets when empty buffers are present.If the config contains sequential empty-valued keys such as:
(the AmneziaVPN client currently does not ignore empty-valued keys),
coalesceMessagesmay generate an emptyipv6.Message, resulting in an empty UDP packet being sent.This happens because trailing empty buffers are still coalesced into a separate message instead of being skipped entirely.
The following unit test reproduces the issue (add it to
conn/bind_std_test.go):Current behavior:
Expected behavior:
Empty buffers should be ignored completely.
coalesceMessagesshould never emit an emptyipv6.Message.No zero-length UDP packets should be transmitted.
@ygurov commented on GitHub (Jun 17, 2026):
Hi @orange-banal-pole,
Thanks for reporting this one. I have introduced some changes to prevent this behavior on the junk-generation side: this would simply ignore any empty value treating it as not actually set one
github.com/amnezia-vpn/amneziawg-go@1cc94272ca