Skip to content

fix(datatype): reject invalid port numbers before narrowing - #11950

Open
embrace897 wants to merge 1 commit into
deepflowio:mainfrom
embrace897:codex/main-invalid-port
Open

embrace897 wants to merge 1 commit into
deepflowio:mainfrom
embrace897:codex/main-invalid-port

Conversation

@embrace897

Copy link
Copy Markdown

Port parsing converts integers directly to uint16, so out-of-range values such as 65536 silently become another port. Reversed ranges are also accepted. Validate the 0..65535 bounds and endpoint order before constructing a PortRange, retaining the existing policy of ignoring invalid tokens.

Validation: an isolated Go harness using the production parsing functions fails on the original implementation and passes invalid/boundary fixtures after the change. A package regression is included. Full datatype package testing remains unverified because dependency downloads did not complete; full server and eBPF validation were not run.

Prepared with AI assistance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant