mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #234] fix: free ispecs after handshake workers stop #247
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#247
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/234
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open
Base:
master← Head:fix/ispec-teardown-uaf📝 Commits (1)
500e9bffix: free ispecs after handshake workers stop📊 Changes
1 file changed (+2 additions, -3 deletions)
View changed files
📝
src/device.c(+2 -3)📄 Description
Summary
Move
jp_spec_free()calls inwg_destruct()after the handshake and packet workqueues are destroyed.Handshake workers can access
wg->ispecs[]while processing queued work. Previously the I1-I5 specs were freed before those workers were stopped, which left a teardown race where a worker could access already-freedpkt/modsmemory.After this change, the workqueues are destroyed first, and the ispecs are freed only after no worker can still use them.
Scope
This PR intentionally fixes only the ispec teardown ordering issue from #225.
It does not address the other issues reported there (
Jmin > Jmax, unchecked junk-buffer allocation, etc.), so it should not close the whole issue.Related to #225
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.