mirror of
https://github.com/amnezia-vpn/amneziawg-tools.git
synced 2026-12-03 18:12:41 +07:00
[PR #78] fix: long I1-I5 awg setconf crash due to buffer overflow #78
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-tools#78
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?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-tools/pull/78
Author: @extracomplex
Created: 10/15/2026
Status: 🔄 Open
Base:
master← Head:master📝 Commits (1)
8ba871eLong I1-I5 setconf crash fix.📊 Changes
2 files changed (+48 additions, -18 deletions)
View changed files
📝
src/ipc-linux.h(+37 -16)📝
src/netlink.h(+11 -2)📄 Description
Execution of awg setconf with such a long I1-I5 values results in crash dump due to buffer overflow in mnl_attr_put_strz() function.
Netlink has a default buffer size of one memory page long, but no more than 8192 bytes when passing config parameters from userspace to the kernel module. I1-I5 params may be quite long, for example full MTU 1500 packet encoded in hex b-tag results in 2507 bytes string (+ zero termination). All five I1-I5 parameters exceeds 12K in total + other keys, peers, etc...
This fix extends Netlink buffer up to 16K and introduces buffer overflow checked version of mnl_attr_put_strz() function.
Amneziawg's I1-I5 params plays significant role in hiding VPN traffic and overcoming Internet censorship.
Fixes #69
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.