Big Landlock Networking Fix

Landlock’s current features for restricting networking are limited as of today (September 2026).

In my understanding, the missing pieces are:

The way to think about this is by considering the state graph for socket connections on connection-oriented protocols. Operations that we should restrict are highlighted in red:

socket() fresh socket listen() listening socket accept() connected socket connect() connected socket

Notes:

1. Make it impossible to contruct sockets of certain types

As I discussed on my weblog before, you can absolutely create listening sockets without calling bind(2). It is listen(2), not bind(2), which starts to listen on a port, and it hands out an emphemeral port if needed.

2. Control operations through which you can create connections

For socket types that are common, we may have cases where we want to permit their creation and use, but restrict the ways in which incoming and outgoing interactions can be done.

2.1. More protocol support

Control bind(2) and connect(2) for these additional connection-oriented protocols:

Compare with Landlock erratum 1: In the initial version of the LandlockTcpPortControl, these additional protocols were accidentally restricted as they also use sockets of family AF_INET/AF_INET6 and type SOCK_STREAM.

Related Landlock controls which already exist:

2.2. Control listen(2)

Additionally: