forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
landlock: Add UDP bind+connect access control
If an app doesn't need to be able to open UDP sockets, it should be denied the right to create UDP sockets altogether (via seccomp and/or landlock-lsm#6 when it lands). For apps using UDP, add support for two more fine-grained access rights: - LANDLOCK_ACCESS_NET_CONNECT_UDP, to gate the possibility to connect() a UDP socket. For client apps (those which want to avoid specifying a destination for each datagram in sendmsg()), and for a few servers (those creating per-client sockets, which want to receive traffic only from a specific address) - LANDLOCK_ACCESS_NET_BIND_UDP, to gate the possibility to bind() a UDP socket. For most servers (to start listening for datagrams on a non-ephemeral port) and can be useful for some client applications (to set the source port of future datagrams, e.g. mDNS requires to use source port 5353) No restriction is enforced on send()/recv() to preserve performance. The security boundary is to prevent acquiring a bound/connected socket. Bump ABI to v7 to allow userland to detect and use these new restrictions. Signed-off-by: Matthieu Buffet <[email protected]>
- Loading branch information
1 parent
adc2186
commit c7921af
Showing
4 changed files
with
76 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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