[PR #78] fix: long I1-I5 awg setconf crash due to buffer overflow #78

Open
opened 2026-10-25 04:18:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 8ba871e Long 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.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-tools/pull/78 **Author:** [@extracomplex](https://github.com/extracomplex) **Created:** 10/15/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`8ba871e`](https://github.com/amnezia-vpn/amneziawg-tools/commit/8ba871e297ab3a5046fb705a37ff0ece1ff7991d) Long I1-I5 setconf crash fix. ### 📊 Changes **2 files changed** (+48 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/ipc-linux.h` (+37 -16) 📝 `src/netlink.h` (+11 -2) </details> ### 📄 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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/amneziawg-tools#78
No description provided.