mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #236] fix: handle junk buffer allocation failure #250
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-linux-kernel-module#250
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-linux-kernel-module/pull/236
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open
Base:
master← Head:fix/junk-buffer-allocation📝 Commits (1)
97ae2affix: handle junk buffer allocation failure📊 Changes
1 file changed (+9 additions, -7 deletions)
View changed files
📝
src/send.c(+9 -7)📄 Description
Summary
Check the dummy junk packet buffer allocation before using it during
handshake initiation.
Previously
kzalloc(wg->jmax, GFP_KERNEL)was dereferenced unconditionally.If the allocation failed under memory pressure, the following
get_random_bytes()call would operate on a NULL buffer.With this change, dummy junk packets are skipped for that handshake attempt
when the allocation fails, while the actual handshake initiation continues
normally.
Scope
This PR addresses only the unchecked junk-buffer allocation reported in #225.
The
Jmin > Jmaxrange issue is handled separately in #235, and the ispecteardown ordering issue is handled in #234.
A broader earlier attempt in #188 included a similar allocation check together
with unrelated fixes; this PR intentionally isolates just this send-path
allocation failure.
Related to #225
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.