On Mon, 2017-03-13 at 08:40 +0000, Weiyuan (David, Euler) wrote:
> Hi
>  
> Currently I’m thinking about disable SECURITY_SELINUX_DEVELOP
> by default to enhance security,  So hacker can not easily turn off
> selinux
> by modify the global variable “selinux_enforing”.
>  
> Question:
> If SECURITY_SELINUX_DEVELOP is disabled, the kernel will run in
> enforcing mode from start,
> but there is no policy before init process load sepolicy into kernel.
> In this no policy but enforcing stage,  what will kernel behave?  
> Will there be avc denied before loading sepolicy?

Until the policy is loaded, the security server allows all permissions.
See security/selinux/ss/services.c:security_compute_av(), the
!ss_initialized case.  So, no, you won't get any avc denials before
loading policy.  The security server resets the AVC upon policy loads,
so any permissions cached before loading policy will be flushed upon
the first policy load and rechecked on subsequent operations.
_______________________________________________
Seandroid-list mailing list
Seandroid-list@tycho.nsa.gov
To unsubscribe, send email to seandroid-list-le...@tycho.nsa.gov.
To get help, send an email containing "help" to 
seandroid-list-requ...@tycho.nsa.gov.

Reply via email to