seccomp: Use an allow-list for socket domains - #39
Conversation
Replace the open-ended range checks with the Linux address families the default profile supports. AF_ALG and AF_VSOCK remain blocked, and unknown or future domains now receive the profile's default EPERM response. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
4fac163 to
f8d7350
Compare
|
Quick LLM review; in case it could indeed be an option;
|
|
Done. |
runc splits multiple comparisons on the same syscall argument into separate rules, so bounded ranges become unions and can allow blocked domains. Use one less-than rule for the consecutive domains below AF_ALG. The only additional value it matches is AF_UNSPEC, which is not a creatable domain. Keep higher domains as equality rules so AF_ALG, AF_VSOCK, and unknown or future domains remain blocked. This reduces the generated socket entries from 43 to seven. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
23ce641 to
65adc7e
Compare
|
@AkihiroSuda @djs55 PTAL |
Replace the open-ended range checks with the Linux address families the default profile supports. AF_ALG and AF_VSOCK remain blocked, and unknown or future domains now receive the profile's default EPERM response.