mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-14 05:41:56 +00:00
[GH-ISSUE #233] junk.c: <r>/<rc>/<rd> size is parsed but never validated #133
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#133
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?
Originally created by @hoaxisr on GitHub (Sep 8, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/233
The three padding-tag parsers accept any value
kstrtoint()can parse, including negative numbers and values close toINT_MAX. Only the return code is checked, never the parsed value:parse_r_tag()in src/junk.c:112parse_rc_tag()in src/junk.c:143parse_rd_tag()in src/junk.c:170Reproduction
Suggested fix
Reject non-sane sizes where they are parsed, in all three parsers:
Why this matters outside of a lab
I1–I5 usually reach awg setconf verbatim from a .conf file the user received from someone else, so the value is not necessarily one the operator
chose or reviewed.