Kernel space: authoritative hooks for containerization

The containers developers have what would seem to be a relatively straightforward problem: they would like to control access to devices on a per-container basis. Then containers could safely be granted access to specific devices without compromising the overall security of the system - even if a container has a root-capable process which can create new device files.

Implementing this feature has been a longer journey than these developers had imagined, though, with the "device whitelist" feature being sent around to different kernel subsystems almost like one of those famous garbage barges from years past. A final resting place may have been found, though, and it may signal a change in how some security decisions are made in the kernel in the future.

The original version of the patch, posted by Pavel Emelyanov, set up a control group for the management of device accessibility within containers. The actual rules - and their enforcement - were stored deep within the device model subsystem. This drew an objection from Greg Kroah-Hartman, who suggested that, instead, this kind of access control should done either with udev or with the Linux security module (LSM) subsystem. Udev does not give the desired degree of control and, apparently, can be problematic for those wanting to run older distributions within containers, so it was not seriously considered. The LSM suggestion was, after some resistance, taken to heart, though.

The result was the device whitelist LSM patch, posted by Serge Hallyn.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Componentization vs. containerization ? interop vs isolation ?

In a kernel, you certainly want componentization of drivers to do universal interoperative instructions for all classes of a device. Have enough interrupts to operate each device with all other devices using realtime threads. Componentization of drivers can bridge between i386 and i686 platforms, during installation from bios PNPos.

Containment is foolishness, to limit capabilities of any device to operate with other devices, on the net(bluetooth, etc), in intranet environment, and on your own computer? containerment is using interrrupts(and chipo selct) to select devices or deselect devices? However; contanerization can be groups of components of instructions in universal drivers for any class of devices.

I think more thoughts on componentization of drivers by microkernels such as in QNX is important for linux kernel developers to consider?