[GH-ISSUE #102] A potential memory leak in junk.c #59

Open
opened 2026-10-13 21:06:08 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @orange-banal-pole on GitHub (Oct 9, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/102

Originally assigned to: @ygurov on GitHub.

github.com/amnezia-vpn/amneziawg-linux-kernel-module@87a06ff146/src/junk.c (L284-L289)

If the first kzalloc succeeds but the second one fails, the current code will return without freeing spec->pkt.

Originally created by @orange-banal-pole on GitHub (Oct 9, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/102 Originally assigned to: @ygurov on GitHub. https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/blob/87a06ff146c20c2cc661a38f2b193ac807c39068/src/junk.c#L284-L289 If the first `kzalloc` succeeds but the second one fails, the current code will return without freeing `spec->pkt`.
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-linux-kernel-module#59
No description provided.