Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new plugin to enable Linux-specific namespace functionality #2666

Merged
merged 1 commit into from Oct 11, 2023

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 <jsegitz@suse.de>

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
1 check passed
@pmatilai pmatilai deleted the unshare branch October 11, 2023 06:52
@dmnks dmnks added the plugins RPM plugins label Nov 28, 2023
@pmatilai pmatilai added the highlight Release highlight label Mar 22, 2024
@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
highlight Release highlight 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