qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Brian Wiltse <brian.wiltse@live.com>,
	Konstantin Kostiuk <kkostiuk@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Bin Meng" <bin.meng@windriver.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Yonggang Luo" <luoyonggang@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Mauro Matteo Cascella" <mcascell@redhat.com>,
	"Yan Vugenfirer" <yvugenfi@redhat.com>,
	"Evgeny Iakovlev" <eiakovlev@linux.microsoft.com>,
	"Andrey Drobyshev" <andrey.drobyshev@virtuozzo.com>,
	"Xuzhou Cheng" <xuzhou.cheng@windriver.com>
Subject: Re: [PATCH v2 0/2] QGA installer fixes
Date: Thu, 2 Mar 2023 12:06:12 +0100	[thread overview]
Message-ID: <20bb422e-746d-e841-5d26-ee93cb1da9ab@linaro.org> (raw)
In-Reply-To: <SN4P220MB079034D6B286760E22D50411EBAC9@SN4P220MB0790.NAMP220.PROD.OUTLOOK.COM>

Hi Brian, Konstantin,

On 28/2/23 23:48, Brian Wiltse wrote:
> Microsoft has a list of best practices for MSI creation which covers 
> custom actions 
> https://learn.microsoft.com/en-us/windows/win32/msi/windows-installer-best-practices#if-you-use-custom-actions-follow-good-custom-action-practices <https://learn.microsoft.com/en-us/windows/win32/msi/windows-installer-best-practices#if-you-use-custom-actions-follow-good-custom-action-practices>, The change to the custom action from an interactive command shell to a silent invocation of rundll32.exe keeps the interactive shell from being easily caught and abused, but this does not fully solve the repair from being triggered from a non admin user. There is still the potential for abuse indirectly via attacks like the Mitre documented Hijack Execution Flow technique - Path Interception by PATH Environment Variable (https://attack.mitre.org/techniques/T1574/007/ <https://attack.mitre.org/techniques/T1574/007/>), or even the abuse of potential arbitrary folder creates, file writes and deletes in user-controlled areas such as C:\ProgramData.
> 
> The Change button was removed from "Programs and Features", but the 
> cached installer in c:\windows\installer can be leveraged directly to 
> start a privileged repair with msiexec.exe as a non-administrative user. 
> Ideally, the MSI would be compiled with the Privileged property 
> https://learn.microsoft.com/en-us/windows/win32/msi/privileged 
> <https://learn.microsoft.com/en-us/windows/win32/msi/privileged> or 
> AdminUser property 
> https://learn.microsoft.com/en-us/windows/win32/msi/adminuser 
> <https://learn.microsoft.com/en-us/windows/win32/msi/adminuser> or 
> InstallPrivileges="Elevated" 
> https://wixtoolset.org/docs/v3/xsd/wix/package/ 
> <https://wixtoolset.org/docs/v3/xsd/wix/package/> or similar privilege 
> check that which would help ensure the user has proper privileges to 
> perform the repair or change action. However, since the QEMU build 
> process leverages WiXL from msitools, many of the WiX property types are 
> not currently supported to leverage as solutions ( i.e. (wixl:1077): 
> GLib-GObject-WARNING **: 17:49:05.477: g_object_set_is_valid_property: 
> object class 'WixlWixPackage' has no property named 'InstallPrivileges' 
> ). This similar to wixl issue 40 
> https://gitlab.gnome.org/GNOME/msitools/-/issues/40 
> <https://gitlab.gnome.org/GNOME/msitools/-/issues/40>.
> 
> I do see that Wixl appears to support the custom action JScriptCall. 
> This might provide for a facility for a script could be run to check if 
> the user has the proper privileges before privileged actions are taken 
> in the repair process, but this is not an ideal solution.

Does that mean this patchset is, although "not ideal", sufficient
to fix CVE-2023-0664? Or does this need more work?
(IOW, do we feel happy enough and want to merge this and forget about it?)

Konstantin, you use "Fixes: CVE-2023-0664" in two different patches.
I'm worried a downstream distrib only pick one and feel safe. Maybe
use something like "Fixes: CVE-2023-0664 (part 1 of 2)".


  reply	other threads:[~2023-03-02 11:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 11:21 [PATCH v2 0/2] QGA installer fixes Konstantin Kostiuk
2023-02-21 11:21 ` [PATCH v2 1/2] qga/win32: Remove change action from MSI installer Konstantin Kostiuk
2023-02-21 11:21 ` [PATCH v2 2/2] qga/win32: Use rundll for VSS installation Konstantin Kostiuk
2023-02-21 11:41 ` [PATCH v2 0/2] QGA installer fixes Philippe Mathieu-Daudé
2023-02-27  8:18   ` Konstantin Kostiuk
2023-02-28 22:48     ` Brian Wiltse
2023-03-02 11:06       ` Philippe Mathieu-Daudé [this message]
2023-03-05  3:01         ` Brian Wiltse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20bb422e-746d-e841-5d26-ee93cb1da9ab@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bin.meng@windriver.com \
    --cc=brian.wiltse@live.com \
    --cc=eiakovlev@linux.microsoft.com \
    --cc=kkostiuk@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=luoyonggang@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mcascell@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    --cc=xuzhou.cheng@windriver.com \
    --cc=yvugenfi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).