daemon/libnetwork: make libnftables opt-in only#52886
Merged
Merged
Conversation
As libnftables uses `select(2)` on the netlink socket the process is aborted if the socket's file descriptor is >= 1024. A dockerd process could easily exceed 1024 open file descriptors at a time under normal circumstances, so there is a risk of libnftables killing dockerd at a random time through no fault of dockerd. Default to programming nftables rulesets by exec'ing `nft -f` until libnftables is updated to be compatible with processes that open a large number of file descriptors by using `poll(2)` or `epoll(2)` instead of `select(2)`. Signed-off-by: Cory Snider <csnider@mirantis.com>
vvoland
approved these changes
Jun 15, 2026
robmry
approved these changes
Jun 15, 2026
Member
|
Do we need a tracking-ticket to re-enable it once fixed upstream? Mostly considering that I think our intent was to do the exact reverse, and not depend on the binary. |
Contributor
Author
Yes, that's a good idea. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
select()/FD_SETSIZEoverflow when fd >= 1024 #52873Summary
As libnftables uses
select(2)on the netlink socket the process is aborted if the socket's file descriptor is >= 1024. A dockerd process could easily exceed 1024 open file descriptors at a time under normal circumstances, so there is a risk of libnftables killing dockerd at a random time through no fault of dockerd. Default to programming nftables rulesets by exec'ingnft -funtil libnftables is updated to be compatible with processes that open a large number of file descriptors by usingpoll(2)orepoll(2)instead ofselect(2).Release notes (optional)
A picture of a cute animal (not mandatory but encouraged)