lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOQ_QsgUrEyqLmjWPP2k_EUgp-VYv7ocT1w6EbJD=mxU+gPAfw@mail.gmail.com>
Date:   Mon, 18 Apr 2022 10:14:42 -0700
From:   Oliver Upton <oupton@...gle.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        stable@...nel.org, Marc Zyngier <maz@...nel.org>,
        Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH 5.17 183/219] KVM: Dont create VM debugfs files outside of
 the VM directory

Hi Greg,

On Mon, Apr 18, 2022 at 5:24 AM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> From: Oliver Upton <oupton@...gle.com>
>
> commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream.
>
> Unfortunately, there is no guarantee that KVM was able to instantiate a
> debugfs directory for a particular VM. To that end, KVM shouldn't even
> attempt to create new debugfs files in this case. If the specified
> parent dentry is NULL, debugfs_create_file() will instantiate files at
> the root of debugfs.
>
> For arm64, it is possible to create the vgic-state file outside of a
> VM directory, the file is not cleaned up when a VM is destroyed.
> Nonetheless, the corresponding struct kvm is freed when the VM is
> destroyed.
>
> Nip the problem in the bud for all possible errant debugfs file
> creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing,
> debugfs_create_file() will fail instead of creating the file in the root
> directory.
>
> Cc: stable@...nel.org
> Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions")
> Signed-off-by: Oliver Upton <oupton@...gle.com>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Can you drop this patch from stable for the time being? There's a bug
in it because KVM does init/destroy awkwardly. Sean working on a fix
[1].

[1]: https://lore.kernel.org/kvm/20220415004622.2207751-1-seanjc@google.com/

--
Thanks,
Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ