mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #237] fix: reject negative junk tag sizes #249
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#249
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/237
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open
Base:
master← Head:fix/reject-negative-junk-tag-sizes📝 Commits (1)
73995f2fix: reject negative junk tag sizes📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
src/junk.c(+3 -3)📄 Description
Summary
Reject negative size arguments in the CPS padding tags parsed by
junk.c:<r N><rc N><rd N>kstrtoint()accepts negative values, and the parsed length was previouslystored in
tag->pkt_sizewithout validating its sign.A negative modifier length can then participate in the aggregate packet-size
calculation and, when combined with another positive tag, leave a small positive
allocation while later copy/modifier operations still use the negative per-tag
size.
This change rejects negative lengths at parse time before a
jp_tagis created.Scope
This PR intentionally addresses only the negative-size parsing problem from #233.
It does not add a new upper bound for positive tag sizes or change aggregate
pkt_sizeoverflow handling.Fixes #233
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.