Merged
Conversation
…t kernel deadlocks on legacy Android kernels
Enabled Droidspaces to respect the user's preferred login shell by manually parsing /etc/passwd within the container's mount namespace. Detailed Changes: - Added get_user_shell() helper in utils.c to reliably extract the default shell (seventh field) from /etc/passwd for a specific user. - Updated enter_rootfs() in container.c to prioritize the detected shell, ensuring that changes made via `chsh` inside the container now persist. - Maintained a hardcoded /bin/bash|ash|sh priority list as a robust fallback for cases where /etc/passwd is missing or the preferred shell is not executable. Fixes the issue where users were forced back into bash/ash on every re-entry regardless of their shell configuration. Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…sking
Harden the container runtime by dropping dangerous capabilities and
masking sensitive kernel interfaces in /proc and /sys.
- Implement ds_apply_capability_hardening() with a tiered model:
- Universally drop CAP_SYS_MODULE and CAP_SYS_BOOT in all modes.
- In standard mode, drop RAWIO, PTRACE, PACCT, MAC_*, and power caps.
- Hardware mode preserves most caps for low-level device interaction.
- Implement ds_apply_jail_mask() for filesystem-level isolation:
- Always mask /proc/sysrq-trigger, /proc/kcore, and debug interfaces.
- Universally remount /proc/sys/kernel/sysrq as read-only.
- Standard mode applies strict masks to /proc/asound, /sys/firmware, etc.
- Add robust error checking for prctl() calls and dynamic drop logging.
- Ensure the hardening occurs late in the boot sequence to avoid breaking
unshare and namespace setup.
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…er_rootfs() and run_in_rootfs() Signed-off-by: ravindu644 <droidcasts@protonmail.com>
…share flag filters.
…smatches and blocking x32 ABI syscalls on x86-64.
…pe vulnerability.
Signed-off-by: ravindu644 <droidcasts@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.