Message ID | 20180409002738.163941-109-alexander.levin@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kernel-hardening-return-12903-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3B9060236 for <patchwork-kernel-hardening@patchwork.kernel.org>; Mon, 9 Apr 2018 06:10:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5BC4288C3 for <patchwork-kernel-hardening@patchwork.kernel.org>; Mon, 9 Apr 2018 06:10:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA15F28A67; Mon, 9 Apr 2018 06:10:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id DC89F288C3 for <patchwork-kernel-hardening@patchwork.kernel.org>; Mon, 9 Apr 2018 06:10:33 +0000 (UTC) Received: (qmail 6130 invoked by uid 550); 9 Apr 2018 06:10:17 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: <mailto:kernel-hardening@lists.openwall.com> List-Help: <mailto:kernel-hardening-help@lists.openwall.com> List-Unsubscribe: <mailto:kernel-hardening-unsubscribe@lists.openwall.com> List-Subscribe: <mailto:kernel-hardening-subscribe@lists.openwall.com> List-ID: <kernel-hardening.lists.openwall.com> Delivered-To: mailing list kernel-hardening@lists.openwall.com Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 6072 invoked from network); 9 Apr 2018 00:38:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kzMDKbR14QLtnrrF4vc9iaxgKxDRnd1hnkbNEp05Lbc=; b=BlRcsugX2o6GqcyrAY3QK7UU5+BDktVnhfaYlsETMPYIZLt1khk0WHCj6fI3OFosA1FP0gokWvqaTyHnM9z0yXfx3HgiaJuBZbN99U/SwSjRmnXrkZIUPr05gqOZJ2A9m6Ccf6HdzjfoGvUaMNpAgh7wD5Fqk89Y4NTHOu73ZS0= From: Sasha Levin <Alexander.Levin@microsoft.com> To: "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: Paolo Bonzini <pbonzini@redhat.com>, "kernel-hardening@lists.openwall.com" <kernel-hardening@lists.openwall.com>, Kees Cook <keescook@chromium.org>, =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= <rkrcmar@redhat.com>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL for 4.4 109/162] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl Thread-Topic: [PATCH AUTOSEL for 4.4 109/162] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl Thread-Index: AQHTz5nF2m1UU3oaVkuVUAGNCPsxTQ== Date: Mon, 9 Apr 2018 00:29:07 +0000 Message-ID: <20180409002738.163941-109-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1110; 7:yWaw2wZzTtc5/1eXbsT5601Vp/ULQEWlOz7CO8kZlm2t9aVBN8cxXIrwwFGcjG96SQFDISemp00YN2xqbTsfkb3qxHbFnhc5xwFSpvVVRImbOrMw6NsvEQj+NmxZhGztgXR7oKq0ufq9eIWHoAd1kyv39OgtCprtOCZU2+auiwa6LYK2JMUxY50E+WrwnhLsITu3o3Lvo0JZsSi2e6fcEAVkcmESwx+lNzN1bXm1anCZVJbSG57AzDx+oFIxiSwO; 20:6nnB7T9takWWTG+bILaIxhbJOYmg/QmrV3IE0H4suJZ0+E9plGLhJSXmLfvfGoc49X5l4hfxo6Cgu+74lEptB+Axoyyt2goIiCmCgn7H5CQJUzFUWnEbeEzaUzEIH09t5huvkpuNStImhsvxBg83JkOFTyr1WRwzRg2yQZq8AP4= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: c46b4106-96d8-4bf1-de0a-08d59db21eaa x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1110; x-ms-traffictypediagnostic: DM5PR2101MB1110: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB1110F68CE6A0C625BE227AC4FBBF0@DM5PR2101MB1110.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR2101MB1110; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1110; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(346002)(396003)(376002)(366004)(199004)(189003)(53936002)(186003)(5250100002)(105586002)(11346002)(99286004)(476003)(66066001)(6512007)(86362001)(575784001)(3660700001)(1076002)(54906003)(68736007)(110136005)(3280700002)(316002)(305945005)(4326008)(107886003)(22452003)(14454004)(7736002)(446003)(6666003)(2501003)(10290500003)(3846002)(6116002)(72206003)(106356001)(25786009)(6486002)(6436002)(8936002)(478600001)(5660300001)(86612001)(8676002)(81156014)(59450400001)(2906002)(102836004)(81166006)(6506007)(2900100001)(76176011)(2616005)(486006)(26005)(36756003)(10090500001)(97736004)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1110; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: p+kMo2feeyjaoH0AWwlZzrGVFHwYc7gKFXXmF/+nMOBnl/c2zYuh2vQYuuxK24JSWoUJcI8wSSdSZ80vtc5K2BqicrZ/qRVaQ8WgU9SaSLbc+VbTcGBX01bhGQux7Rsc7z4EjFuMM07LzFK24gm3JhUjIwU7KyQF32Z2016H+xgaa10T+aVU3bcRJcftgEbdbbZ/PZUFGPtCTUhXQ0EFgMbEHW5oGFeQ6mIMnPNNNrdMCcWG/WNmhR6TnZ4RBdmmcMt/4paStMuxbyP0J8L0mYCuWQ32dthS4aVhoEe+gylN+UFZkZeCIloqAQ1Kj/Xc5o2TwrTXU+EsPPf2QJ2gXy2xtFrir/s4roCQfWLwySrPSjH7eDzIF9A/CQCFGXRkH1q7hHaEJ8xfVbJmABoNcen/XwY2BSXFX79gjUESH1c= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <69065A9D733C92428F7E0428E1A89B6A@namprd21.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c46b4106-96d8-4bf1-de0a-08d59db21eaa X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:29:07.4117 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1110 X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f37f0c72b22a..9cea09597d66 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3973,13 +3973,14 @@ long kvm_arch_vm_ioctl(struct file *filp, mutex_unlock(&kvm->lock); break; case KVM_XEN_HVM_CONFIG: { + struct kvm_xen_hvm_config xhc; r = -EFAULT; - if (copy_from_user(&kvm->arch.xen_hvm_config, argp, - sizeof(struct kvm_xen_hvm_config))) + if (copy_from_user(&xhc, argp, sizeof(xhc))) goto out; r = -EINVAL; - if (kvm->arch.xen_hvm_config.flags) + if (xhc.flags) goto out; + memcpy(&kvm->arch.xen_hvm_config, &xhc, sizeof(xhc)); r = 0; break; }