-
Notifications
You must be signed in to change notification settings - Fork 162
busybox #1033
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
Closed
Closed
busybox #1033
+1
−0
Conversation
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
028c451
to
d1b06ca
Compare
In minimal systems, /bin/sh is often a symlink to busybox. SELinux expects /bin/sh to be labeled shell_exec_t, so busybox bins can be labeled with shell_exec_t. Reference: https://git.yoctoproject.org/poky/tree/meta/recipes-core/busybox/busybox.inc#n251 Denials: [ 12.593748] audit: type=1400 audit(15.527:68): avc: denied { map } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627879] audit: type=1400 audit(15.527:68): avc: denied { read execute } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627894] audit: type=1400 audit(15.539:69): avc: denied { map } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627897] audit: type=1400 audit(15.539:69): avc: denied { read execute } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 labelling busybox bins as shell_exec_t, ensuring compatibility with refpolicy expectations and avoiding SELinux denials. Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
sasikuma-qti
pushed a commit
to sasikuma-qti/meta-qcom-selinux
that referenced
this pull request
Oct 15, 2025
In minimal systems, /bin/sh is often a symlink to busybox. SELinux expects /bin/sh to be labeled shell_exec_t, so busybox binaries can be labeled with shell_exec_t. Reference: https://git.yoctoproject.org/poky/tree/meta/recipes-core/busybox/busybox.inc#n251 Denials: [ 12.593748] audit: type=1400 audit(15.527:68): avc: denied { map } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627879] audit: type=1400 audit(15.527:68): avc: denied { read execute } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627894] audit: type=1400 audit(15.539:69): avc: denied { map } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627897] audit: type=1400 audit(15.539:69): avc: denied { read execute } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 labelling busybox binaries as shell_exec_t, ensuring compatibility with refpolicy expectations and avoiding SELinux denials. Upstream-Status: Submitted [SELinuxProject/refpolicy#1033] Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
sasikuma-qti
pushed a commit
to sasikuma-qti/meta-qcom-selinux
that referenced
this pull request
Oct 15, 2025
In minimal systems, /bin/sh is often a symlink to busybox. SELinux expects /bin/sh to be labeled shell_exec_t, so busybox binaries can be labeled with shell_exec_t. Reference: https://git.yoctoproject.org/poky/tree/meta/recipes-core/busybox/busybox.inc#n251 Denials: [ 12.593748] audit: type=1400 audit(15.527:68): avc: denied { map } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627879] audit: type=1400 audit(15.527:68): avc: denied { read execute } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627894] audit: type=1400 audit(15.539:69): avc: denied { map } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 [ 12.627897] audit: type=1400 audit(15.539:69): avc: denied { read execute } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1 labelling busybox binaries as shell_exec_t, ensuring compatibility with refpolicy expectations and avoiding SELinux denials. Upstream-Status: Submitted [SELinuxProject/refpolicy#1033] Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
cc @pebenito |
I don't think this is the right choice. If you're executing the busybox binary directly, the intent is unknown, so # ls -lZ /usr/lib/busybox/usr/bin/sh
-rwxr-xr-x 1 root root system_u:object_r:shell_exec_t 25 Sep 30 23:20 /usr/lib/busybox/usr/bin/sh |
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.
In minimal systems, /bin/sh is often a symlink to busybox.
SELinux expects /bin/sh to be labeled shell_exec_t, so busybox bins
can be labeled with shell_exec_t.
Reference:
https://git.yoctoproject.org/poky/tree/meta/recipes-core/busybox/busybox.inc#n251
Denials:
[ 12.593748] audit: type=1400 audit(15.527:68): avc: denied { map } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid"
dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1
[ 12.627879] audit: type=1400 audit(15.527:68): avc: denied { read execute } for pid=1477 comm="klogd" path="/usr/bin/busybox.nosuid"
dev="sda2" ino=359 scontext=system_u:system_r:klogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1
[ 12.627894] audit: type=1400 audit(15.539:69): avc: denied { map } for pid=1480 comm="syslogd" path="/usr/bin/busybox.nosuid"
dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1
[ 12.627897] audit: type=1400 audit(15.539:69): avc: denied { read execute } for pid=1480 comm="syslogd"
path="/usr/bin/busybox.nosuid" dev="sda2" ino=359 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=file permissive=1
labelling busybox bins as shell_exec_t, ensuring compatibility with
refpolicy expectations and avoiding SELinux denials.