All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] bitbake: Add basic landlock support
@ 2026-06-12 11:38 David Nyström
  2026-06-12 11:38 ` [PATCH [RFC] 1/2] utils: Add landlock_restrict_network function David Nyström
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: David Nyström @ 2026-06-12 11:38 UTC (permalink / raw)
  To: bitbake-devel; +Cc: David Nyström

When current implementation runs in an unprivileged docker container,
basic networking will be allowed by default in all steps, ignoring the
network varflags intention.
Introduce support for landlock blocking of bind and connect, providing
basic support for blocking TCP.
UDP is corrently beeing worked on upstream, but not yet supported.

Landlock requires PR_SET_NO_NEW_PRIVS to prevent escape, 
which is also attempted, this prevents privilege escalation from child.
devshell and related are already tagged with network varflag and
can sudo at will.

syscall ABI is asm-generic, 5.13+ for all archs except alpha.
On alpha, we leak 2 fd:s in the childs context before graceful exit,
which is cleaned up at child termination.
Don't have an alpha target, so this is not tested, evaluated via 
static analysis only.

Landlock also provides a future possibility for filesystem
limitations with the purpose of catching bugs, and preventing
persistance of supply chain releated payloads. writes to f.ex. 
.bashrc and friends.

Signed-off-by: David Nyström <david.nystrom@est.tech>
---
David Nyström (2):
      utils: Add landlock_restrict_network function
      bitbake-worker: Call landlock_restrict_network for tasks without network

 bin/bitbake-worker |  2 ++
 lib/bb/utils.py    | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
---
base-commit: a0158cc8d8f29233a9ade63a4c3ce2e939c4bf16
change-id: 20260611-landlock-621bc1a15305

Best regards,
-- 
David Nyström <david.nystrom@est.tech>



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-17 18:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 11:38 [PATCH RFC 0/2] bitbake: Add basic landlock support David Nyström
2026-06-12 11:38 ` [PATCH [RFC] 1/2] utils: Add landlock_restrict_network function David Nyström
2026-06-13 11:52   ` [bitbake-devel] " Alexander Kanavin
2026-06-13 14:26     ` Richard Purdie
2026-06-15  8:28   ` Paul Barker
2026-07-17 18:11     ` David Nyström
2026-06-12 11:38 ` [PATCH [RFC] 2/2] bitbake-worker: Call landlock_restrict_network for tasks without network David Nyström
2026-06-15  8:30   ` [bitbake-devel] " Paul Barker
2026-07-16 15:44 ` [bitbake-devel] [PATCH RFC 0/2] bitbake: Add basic landlock support Richard Purdie
2026-07-16 15:50   ` David Nyström

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.