K-SELinux: formal analysis and verification of SELinux policies via semantic execution
Jinhui KANG , Jianhong ZHAO , Yongwang ZHAO
Front. Comput. Sci. ›› 2026, Vol. 20 ›› Issue (6) : 2006201
SELinux (Security-Enhanced Linux) enforces mandatory access control (MAC) according to policies. However, due to the inherent complexity of systems, real-world SELinux policies often become intricate, comprising thousands of statements, making manual verification of their correctness and security challenging. In addition, certain environments with stringent security requirements demand the formal verification of policies. While existing policy tools primarily focus on specific aspects of policy analysis, such as integrity and consistency, they lack a unified approach to satisfy diverse requirements. Essentially, their capabilities are limited, and formal guarantees are often absent.
To address these issues, we have comprehensively formalized the semantics of the SELinux policy language in the framework. This approach provides a universal foundation for specifying various requirements, benefiting policy managers and policy tool developers. Furthermore, employing this approach, we have introduced a powerful tool named K-SELinux. This tool enables comprehensive analysis of SELinux policies, encompassing integrity, consistency, completeness, policy queries, policy optimization, and more. Notably, it provides excellent extensibility, enabling the seamless development of additional functions to address evolving needs.
To demonstrate the practicality and effectiveness of our tool, we conducted testing on real-world policies. The tests revealed several crucial issues, including contradictions arising from indirect information flow and incomplete entity restrictions.
SELinux / access control / semantics / verification
| [1] |
|
| [2] |
|
| [3] |
|
| [4] |
|
| [5] |
|
| [6] |
|
| [7] |
|
| [8] |
|
| [9] |
SETools: SELinux policy analysis tools v4. See github.com/OwlCyberDefense/setools?tab=readme-ov-file, accessed 2023-05-03 |
| [10] |
SELinux wiki. See selinuxproject.org/page/Main_Page, accessed 2023-05-03 |
| [11] |
|
| [12] |
|
| [13] |
|
| [14] |
|
| [15] |
|
| [16] |
|
| [17] |
|
| [18] |
|
| [19] |
|
| [20] |
|
| [21] |
|
| [22] |
|
| [23] |
|
| [24] |
|
| [25] |
|
| [26] |
|
| [27] |
|
| [28] |
|
| [29] |
|
| [30] |
|
| [31] |
|
| [32] |
Selinuxproject. Refpolicy release 2.20221101. See github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20221101, accessed 2023-05-03 |
| [33] |
Google. Aosp policy android-8.0.0 r1. See android.googlesource.com/platform/system/sepolicy/+/refs/tags/android-8.0.0_r1, accessed 2023-05-03 |
| [34] |
Google. Aosp policy android-9.0.0 r1. See android.googlesource.com/platform/system/sepolicy/+/refs/tags/android-9.0.0_r1, accessed 2023-05-03 |
Higher Education Press
/
| 〈 |
|
〉 |