Skip to content

Conversation

@pmatilai
Copy link
Member

A plugin is a convenient place to hide Linux-specific functionality. Implemented in this initial version are:

  • Optional private mounts during scriptlet execution, useful for protecting the system from scriptlets (eg /home) and the scriptlets from themselves (eg insecure /tmp usage)
  • Optionally disable network access during scriptlet execution

Note that at this time, scriplets executed with the embedded Lua interpreter are not covered by this because they run inside the main rpm process instead of forking (#2635).

Fixes: #2632
Fixes: #2665

@pmatilai
Copy link
Member Author

Added a testcase for private /tmp

Here's yet another thing we couldn't have tested with fakechroot...

A plugin is a convenient place to hide Linux-specific functionality.
Implemented in this initial version are:

- Optional private mounts during scriptlet execution, useful for
  protecting the system from scriptlets (eg /home) and the scriptlets
  from themselves (eg insecure /tmp usage)
- Optionally disable network access during scriptlet execution

Note that at this time, scriplets executed with the embedded Lua
interpreter are not covered by this because they run inside the main rpm
process instead of forking (rpm-software-management#2635).

Add a testcase for private /tmp

Suggested-by: Johannes Segitz <[email protected]>

Fixes: rpm-software-management#2632
Fixes: rpm-software-management#2665
@pmatilai
Copy link
Member Author

Since there's no input, I conclude this is good enuf for a first version. No doubt there are various other enhancements we can do in this space.

@pmatilai pmatilai merged commit fd8eaa5 into rpm-software-management:master Oct 11, 2023
@pmatilai pmatilai deleted the unshare branch October 11, 2023 06:52
@dmnks dmnks added the plugins RPM plugins label Nov 28, 2023
@dmnks dmnks added the RFE label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugins RPM plugins RFE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFE: run scriptlets in selective filesystem isolation RFE: prevent scriptlet network access

2 participants