Skip to content

Auto-port 5.0: Kqueue: Possible overflow when using netty_kqueue_bsdsocket_setAcceptFilter(...)#16458

Merged
normanmaurer merged 1 commit into
5.0from
auto-port-pr-16451-to-5.0
Mar 13, 2026
Merged

Auto-port 5.0: Kqueue: Possible overflow when using netty_kqueue_bsdsocket_setAcceptFilter(...)#16458
normanmaurer merged 1 commit into
5.0from
auto-port-pr-16451-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16451 to 5.0
Cherry-picked commit: 9b09ab3


Motivation:

How we used strncat(...) was incorrect and could produce an overflow as we did not take the null termination into account. We should better use strlcat(...) which is safer to use and less error-prone.

Modifications:

  • Validate that we will not truncate and so might use the "incorrect value"
  • Use strlcat(...) and so correctly respect the null termination which could cause an overflow before

Result:

Fix possible overflow on systems that support SO_ACCEPTFILTER

…Filter(...) (#16451)

Motivation:

How we used strncat(...) was incorrect and could produce an overflow as
we did not take the null termination into account. We should better use
strlcat(...) which is safer to use and less error-prone.

Modifications:

- Validate that we will not truncate and so might use the "incorrect
value"
- Use strlcat(...) and so correctly respect the null termination which
could cause an overflow before

Result:

Fix possible overflow on systems that support SO_ACCEPTFILTER

(cherry picked from commit 9b09ab3)
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Mar 13, 2026
@normanmaurer normanmaurer merged commit a571502 into 5.0 Mar 13, 2026
22 of 23 checks passed
@normanmaurer normanmaurer deleted the auto-port-pr-16451-to-5.0 branch March 13, 2026 15:27
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.

2 participants