[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aS8FTggpT_7cY3cr@google.com>
Date: Tue, 2 Dec 2025 07:27:10 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH 0/2] KVM: Fix a guest_memfd memslot UAF
On Mon, Dec 01, 2025, Sean Christopherson wrote:
> Fix a UAF due to leaving a dangling guest_memfd memslot binding by
> disallowing clearing KVM_MEM_GUEST_MEMFD on a memslot. The intent was
> that guest_memfd memslots would be immutable (could only be deleted),
> but somewhat ironically we missed the case where KVM_MEM_GUEST_MEMFD
> itself is the only flag that's toggled.
>
> This is an ABI change, but I can't imagine anyone was relying on
> disappearing a guest_memfd memslot.
>
> Patch 2 hardens against the UAF, and prepares for allowing FLAGS_ONLY
> changes on guest_memfd memslots. Sooner or later, we're going to allow
> dirty logging on guest_memfd, so I think it makes sense to guard against
> that so that whoever adds dirty logging support doesn't forget to unbind
> on a FLAGS_ONLY change.
>
> I'll respond with the syzkaller reproducer (it's comically simple).
And almost forgot...
View attachment "reproducer.c" of type "text/x-csrc" (5756 bytes)
Powered by blists - more mailing lists