3.6 KiB
Security
Reporting
Since Gila is new and not used in any critical settings, vulnerabilities may be filed as regular issues for the time being. Please ensure to specify that the issue is a security issue when submitting.
Foreward
Part of what inspires my design philosophy for Gila is the idea of creating a new, fast, and safe kernel with security as a central focus.
Much of today's operating system security discourse comes down to "Sure, you can harden this, this, and this. But (insert OS)'s security model is deeply flawed." This isn't a dig at any one OS- it applies to all of them. Kernels such as Linux, Mach, and NT were built long before today's most salient concepts in computing security were established. Great work is being done on improving what we already have, but it's counterintuitive to try to establish a secure system on a flawed foundation.
Gila aims to start fresh, using modern theories and models, all in a memory safe language that lends itself well to formal verification.
Goals
- Distrustful by default
- Small, simple, and transparent
- Performant
- Capability based
- Highly isolated
Gila's security model
Microkernel architecture
Gila is a microkernel. Only the most important functionality runs at Ring 0 (Protected Mode) to reduce attack surface. This functionality includes:
- Modifying and reading kernel configurations
- Process creation and destruction
- Scheduling
- Memory allocation and management
- Inter-process communication
- Minimal IO drivers, only for debugging
Unprivileged user processes perform complex functionality by interacting with similarly unprivileged server processes via inter-process communication. Servers can perform many different tasks, such as:
- PCI(e)
- ACPI
- AHCI/SATA
- USB
- Ethernet
- TCP/IP
- Security policy
- Filesystems
- Logins
- Graphics
- Managing resources
Servers do one thing each, and one thing well. If a server needs to do a lot of the same thing, it should fork into several processes, so inter-process isolation can improve security.
Userspace Security Model
Most of how information will flow within a full OS is up to the integrator. Gila as a kernel enforces strong boundaries between processes, and requires processes to have the correct capabilities before they may access a resource. The kernel will never trust or act on information gleaned or sent from processes, aside from very limited functionality regarding system calls, to enforce the Biba security model at the boundary between kernelspace and userspace.
Capability based MAC
Gila has no concept of ambient authority. Resource access is not governed based on any inherent privilege level of the accessing process- rather, processes must possess capabilities specific to that resource. A process cannot defer a resource access to a process which already has the capability, it must copy or transfer its own capability to that resource, to the process which will access it.
Gila initializes all capabilities on startup, before handing them over to the userboot process. This process can derive additional capabilities from these initial capabilities, and distribute copies while maintaining the initial capability. Thus, upon revocation by that process, all derived capabilities are revoked as well, even ones held by other processes.
Capabilities are stored in memory regions associated with, but not mapped into the address spaces of, the processes that control them. They are managed through a tree-like structure, so the processes are forced to account for the memory their capabilities use by using their own capabilities as storage spaces.