Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 30 Jan 2023 07:40:47 -0500
From: James Bottomley <>
To: "Reshetova, Elena" <>,
        Leon Romanovsky
Cc: Greg Kroah-Hartman <>,
        "Shishkin, Alexander"
        "Shutemov, Kirill"
        "Kuppuswamy, Sathyanarayanan"
        "Kleen, Andi"
        "Hansen, Dave" <>,
 Gleixner <>,
        Peter Zijlstra <>,
        "Wunner, Lukas" <>,
        Mika Westerberg
        "Michael S. Tsirkin" <>,
        Jason Wang <>,
        "Poimboe, Josh" <>,
        "" <>,
        Cfir Cohen <>, Marc Orr <>,
        "" <>,
        "" <>,
        James Morris
        Michael Kelley <>,
        "Lange, Jon"
        Linux Kernel Mailing List
        Kernel Hardening
Subject: Re: Linux guest kernel threat model for Confidential Computing

On Mon, 2023-01-30 at 07:42 +0000, Reshetova, Elena wrote:
> > The big threat from most devices (including the thunderbolt
> > classes) is that they can DMA all over memory.  However, this isn't
> > really a threat in CC (well until PCI becomes able to do encrypted
> > DMA) because the device has specific unencrypted buffers set aside
> > for the expected DMA. If it writes outside that CC integrity will
> > detect it and if it reads outside that it gets unintelligible
> > ciphertext.  So we're left with the device trying to trick secrets
> > out of us by returning unexpected data.
> Yes, by supplying the input that hasn’t been expected. This is
> exactly the case we were trying to fix here for example:
> I do agree that this case is less severe when others where memory
> corruption/buffer overrun can happen, like here:
> But we are trying to fix all issues we see now (prioritizing the
> second ones though). 

I don't see how MSI table sizing is a bug in the category we've
defined.  The very text of the changelog says "resulting in a kernel
page fault in pci_write_msg_msix()."  which is a crash, which I thought
we were agreeing was out of scope for CC attacks?

> > 
> > If I set this as the problem, verifying device correct operation is
> > a possible solution (albeit hugely expensive) but there are likely
> > many other cheaper ways to defeat or detect a device trying to
> > trick us into revealing something.
> What do you have in mind here for the actual devices we need to
> enable for CC cases?

Well, the most dangerous devices seem to be the virtio set a CC system
will rely on to boot up.  After that, there are other ways (like SPDM)
to verify a real PCI device is on the other end of the transaction.

> We have been using here a combination of extensive fuzzing and static
> code analysis.

by fuzzing, I assume you mean fuzzing from the PCI configuration space?
Firstly I'm not so sure how useful a tool fuzzing is if we take Oopses
off the table because fuzzing primarily triggers those so its hard to
see what else it could detect given the signal will be smothered by
oopses and secondly I think the PCI interface is likely the wrong place
to begin and you should probably begin on the virtio bus and the
hypervisor generated configuration space.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.