On 2015-03-05 5:56 am, cprise wrote:
> AFAIK, the basic Xen hypervisor is about 60K LOC. When sel4 gets to a
> comparable ability with hardware management and 64bit... then re-do
> the comparison.
I took the 150k number from this page...
http://wiki.xen.org/wiki/Xen_Project_Software_Overview
"The Xen Project Hypervisor is an exceptionally lean (<150,000 lines of
code) software layer"
But maybe a bit less if ITL only implements part of Xen for Qubes.
But I receive your point that microkernels do not have all the same
hardware and architecture support and that is part of the difference in
10k vs. 150k LOC count.
> In reference to your general thrust, a primary question is how
> trivially can a dom0 OS interfere with Xen? By that I mean, what kind
> of 'innocent' obscure little changes (if any) in the dom0 OS could
> cause security problems for the hypervisor?
Further detailed investigations into technical vectors of attack is a
good thing. Just not my specialty though.
> Something tells me the number of potential avenues for attack of that
> sort may be very small or zero, since the normal administration of
> Linux systems has nothing to do with Xen (and so attacks on the
> hypervisor would have to be blatant). Maybe Joanna or Marek could
> chime in and tell if my hunch is wrong...
I receive your point. However, it IS the blatantly pursued -- but
potentially covertly coded -- exploits that I fear with putting millions
of LOC into Xen/Qubes Dom0.
There was a debate about this issue we had recently in the Qubes +
Whonix code, where I was able to come up with a method for covertly
hiding dual-purposed innocent looking code across two distinct software
packages that collude together. I'm no expert at such dark arts, but if
I can do it covertly with a couple hours of thought, then true experts
can certainly pull it off, especially with privileged maintainer
positions that under their direct control.
> The bigger risk to dom0 code is not signing the repo metadata,
> especially since the latest NSA 'Equation Group' revelations show that
> they will deny certain updates or roll them back in order to exploit
> former 0days. So now a powerful example has been set for a
> 'theoretical' attack which some of us argued about months ago, now
> apparently a viable avenue for others to use as well.
It's a bigger risk right now, because we use Xen and Linux in our TCB.
Every few days a new package update becomes a new potential attack on
Dom0. This straight up sucks for security.
I'd be happier with a super small slow moving TCB codebase that rarely
ever changes over years of time.
> BTW, I must disagree with the sentiment that many and widespread
> developers are a liability. It sounds specious to me, like Security By
> Obscurity. ITL would/will have Qubes development decentralized to an
> extent that could make Linux appear locked-down by comparison, so
> there is a basic difference of culture there.
This point is not a technological vulnerability point. It is a human
organizational vulnerability point. Especially with recent revelations
of covertly implanting people inside organizations to alter systems and
products.
With a bloated monolithic kernel, if one wants to compromise Linux, one
doesn't have to get Linus Torvaldds to do the dirty work. In fact, that
would be a dumb approach to try to corrupt him, due to his public
profile. Rather, it would be smarter to target or insert somebody who is
a package maintainer of code that has privileged rights in the system.
Could be a Linux kernel component. Could be a Fedora package. The
weakest links in the human organizational chain becomes a juicy exploit
vector to those who would want to corrupt them.
I don't see it as a stretch at all, since this form of human corruption
and infiltration has regularly gone on forever in humanity. And
governments, spies, militaries, cartels, organized criminals, etc around
the world are experts at getting their hands dirty in these ways to
takeover and get what they want. They do far more heinous things as part
of their daily business.
When there are hundreds to thousands of human corruptible entry points
into owning Linux OS distros, combined with sophisticated covert coding
techniques, why wouldn't several people around the globe be looking to
own this? Is rooting/backdooring all of Linux, Fedora, Xen, or Qubes not
a worthwhile target?
It's not an issue of technical security by obscurity. It is a real-world
practical reality of there being a high amount of human-level attack
surface.
It is a different world than our technical bits and bytes. And might be
a socially ugly reality for people to sit back and think about as being
a regular part of this world. But its a layer of human reality that
underlies and controls the production of our technical systems. And can
directly subvert and exploit us.
That's why I think tens to hundreds of MILLIONS of LOC, constantly
changing, expanded, and modified by god knows who is an organizational
mess that is ripe for human-level exploitation.
If I were an evil person with resources, I could almost guarantee you
that I could exploit Qubes Dom0 this way through Linux/Fedora code.
> I think limiting the amount of code and projects that are installed
> into dom0 makes the most sense.
Yes, this would be a great improvement.
And the further it can be stripped down to bare bones, I think the
better it is for security posture.
Why not run a microkernel inside Xen Dom0 or other non-user system
domains?
WhonixQubes