netfilter: conntrack: validate parsed port values in IRC and Amanda helpers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | netfilter: nf_conntrack_irc: reject DCC port values above 65535net/ | +6 | 0 replies | |
| 2/2 | netfilter: nf_conntrack_amanda: reject port values above 65535net/ | +6 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next 0/2] netfilter: conntrack: validate parsed port values in IRC and Amanda helpers
Both nf_conntrack_irc and nf_conntrack_amanda parse port numbers from application-layer protocol data using simple_strtoul(), which returns unsigned long. The results are stored in u16 variables without range checks, silently truncating values above 65535.
This series adds explicit upper-bound validation in both helpers.
Note: checkpatch warns about simple_strtoul being obsolete. Both call sites use the endptr output parameter to advance the parse position, which kstrtoul does not provide. Converting to kstrtoul would require restructuring the parsers, which is out of scope for this fix.
HACKE-RC (2):
netfilter: nf_conntrack_irc: reject DCC port values above 65535
netfilter: nf_conntrack_amanda: reject port values above 65535
net/netfilter/nf_conntrack_amanda.c | 10 ++++++---- net/netfilter/nf_conntrack_irc.c | 7 ++++++- 2 files changed, 12 insertions(+), 5 deletions(-)
Signature · 1 line
2.54.0