void-linux / void-linux/void-packages
List of xbps-triggers that is NOT safe to be run from outside of chroot
Open
Nobody has claimed this yet.
tracking
- Dominant language
- Shell
- Stars
- 3.4k
- Forks
- 2.8k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 299
Description
In light of #23239,
I look into some xbps-triggers, and I think those triggers aren't safe to be run from outside of chroot:
- if the libc in chroot and libc in host is differs and elf in chroot couldn't be interpreted by host's libc (ld is hard-coded),
execve(2)exit with 126,/bin/shwill search next commands in hosts, and use it instead of chroot's executable. system-accounts: check if the user https://github.com/void-linux/void-packages/blob/d148c444e4ff9387da8ada8adf6c3af34e1c4729/srcpkgs/xbps-triggers/files/system-accounts#L112 or group https://github.com/void-linux/void-packages/blob/d148c444e4ff9387da8ada8adf6c3af34e1c4729/srcpkgs/xbps-triggers/files/system-accounts#L29 exists in host (no options to mitigate?), then create user https://github.com/void-linux/void-packages/blob/d148c444e4ff9387da8ada8adf6c3af34e1c4729/srcpkgs/xbps-triggers/files/system-accounts#L113 and group https://github.com/void-linux/void-packages/blob/d148c444e4ff9387da8ada8adf6c3af34e1c4729/srcpkgs/xbps-triggers/files/system-accounts#L31 in host (can be mitigated bygroupadd -R -Panduseradd -R -P, don't know if they're portable). This one is very problematic becausebase-filesuses this triggers- to be filled.
Thought, @void-linux/pkg-committers @ericonr
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked xbps-triggers system-accounts lines 29, 31, 112, and 113, then inspect the other triggers for commands that may act on the host outside a chroot. Reproduce the differing libc and host user/group cases described in the issue. Done means identifying the unsafe triggers and documenting the relevant mitigation or remaining concern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100