Yet another new approach to seccomp
Things have been quiet on the seccomp front recently - until now. Will Drewry, who has been behind the recent attempts to enhance seccomp, has come up with an interesting new approach to the problem. Whether this attempt will be more successful than its predecessors remains to be seen, but Will has managed to step around some of the traps that doomed his previous attempt.
In the last seccomp discussion, there was a fair amount of pressure to adapt the kernel's tracing infrastructure to this task; there was also resistance to using that infrastructure in that way. As explained in detail in the patch posting, Will has come to the conclusion that the tracing infrastructure is not really fit for the task anyway:
Will's new approach has a stroke of brilliance to it: rather than use the ftrace filter mechanism, he has repurposed the networking layer's packet filtering mechanism (BPF). The BPF code normally operates on packets; in the seccomp context, instead, it operates on the register set at the time of each system call. The registers will contain the system call number and its parameters, allowing the filter to make a wide range of decisions on what will (or will not) be allowed. BPF is also well-maintained and well-optimized code; it even has an in-kernel just-in-time compiler. Some of these advantages are lost because seccomp uses its own BPF interpreter; one assumes that a way could be found to merge the two implementations if the underlying idea looks like it will pass muster.
As of this writing, there has not really been time for comments on the new
patch. It will be interesting to see what the developers think.
Meanwhile, those wanting more information should see the patch posting and
the documentation file, which includes a
sample program showing how to use the new facility.
Index entries for this article | |
---|---|
Kernel | BPF/Security |
Kernel | Security/seccomp |
Security | Linux kernel |
Posted Jan 12, 2012 4:03 UTC (Thu)
by scottt (guest, #5028)
[Link] (2 responses)
Posted Jun 1, 2012 16:57 UTC (Fri)
by whacker (guest, #55546)
[Link]
Posted Jul 17, 2012 18:34 UTC (Tue)
by pcmoore (subscriber, #37989)
[Link]
Posted Jan 12, 2012 17:44 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link] (4 responses)
So, when are we going to see kernel-mode JavaScript interpreter? :)
Posted Jan 13, 2012 1:32 UTC (Fri)
by ebiederm (subscriber, #35028)
[Link] (1 responses)
It seems an obvious choice of scripting engine for filtering to me.
Posted Jul 24, 2012 6:51 UTC (Tue)
by jamesmorris (subscriber, #82698)
[Link]
It's an inspired work of engineering.
Posted Jan 15, 2012 10:20 UTC (Sun)
by liljencrantz (guest, #28458)
[Link] (1 responses)
Posted Jan 15, 2012 22:17 UTC (Sun)
by Cyberax (✭ supporter ✭, #52523)
[Link]
architecture independent seccomp policies
architecture independent seccomp policies
architecture independent seccomp policies
Yet another new approach to seccomp
Yet another new approach to seccomp
Yet another new approach to seccomp
You mean like Lunatik, the Lua interpreter embedded in the NetBSD kernel?
Yet another new approach to seccomp
Yet another new approach to seccomp