Message ID | 20180409004042.164920-16-alexander.levin@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kernel-hardening-return-12904-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 7AADE6020F for <patchwork-kernel-hardening@patchwork.kernel.org>; Mon, 9 Apr 2018 06:10:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DDB0288C3 for <patchwork-kernel-hardening@patchwork.kernel.org>; Mon, 9 Apr 2018 06:10:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61C1428A67; Mon, 9 Apr 2018 06:10:43 +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 1D6A9288C3 for <patchwork-kernel-hardening@patchwork.kernel.org>; Mon, 9 Apr 2018 06:10:41 +0000 (UTC) Received: (qmail 7682 invoked by uid 550); 9 Apr 2018 06:10:22 -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 13732 invoked from network); 9 Apr 2018 00:41:42 -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=CBfVUhuBXqkLydBPHnGIReP/POc57JMAQycQSi5gNpU=; b=X/3J4DWob9KPjkAZemoR6VOk9EWSS7xCdr+v+1iTbSFsiFQDx03EsFT6BPfoyomr0vI+w0v+Bo3NcY+gKICG8ISa8hR8CHmQaO3hwGq3sqlr+t6Q7lcLgEwkxIyARDUmTgL70e6gh5BNg3WtNTB5vIF7WXI3phRVuhNiH7QXiCI= 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 3.18 066/101] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl Thread-Topic: [PATCH AUTOSEL for 3.18 066/101] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl Thread-Index: AQHTz5t/wQ15JJmn9UmyphWgsSA0+g== Date: Mon, 9 Apr 2018 00:41:28 +0000 Message-ID: <20180409004042.164920-16-alexander.levin@microsoft.com> References: <20180409004042.164920-1-alexander.levin@microsoft.com> In-Reply-To: <20180409004042.164920-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; DM5PR2101MB0901; 7:Ofr1RQczws9Eid900EOQ2moxs1rDNQFP/wlPh4V2qVIUlr8Joun/lg6y4m9Npctomz5ASVr0GT0DEGaS3V6uw/UlegGjg8bTjhxzB0wGF9+mcl1WKxxhRCGOgiLaq6d72xNLqqxIksF/yr4pCnKEx++Sd1RNSzZrAQ0Jmm2xs0uXzccXePe7XtAe1HYTtl4tgfR0nACiYUBCuAJHR3wTJJzriQHMHdWrVl07pB7zwcpvGGd5Wm4322awKwXvcoKo; 20:yzVFQArnLtBqPVKHCAIckWvmdYasOwFs5My6dFQ8+ERepzrPryNYpkU68PHUoSRlfa298kJBY1KmbcEtxJtIZuOVxW5heq+gffamPYBpQZBT2YclThBNrFdSRCtu5pcnefo9tPB/O3uh2iXSViL5ShHJKVZHKF/b/CsVQHVUcv0= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 9d041c08-9fe6-4d0e-70af-08d59db2a1f2 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0901; x-ms-traffictypediagnostic: DM5PR2101MB0901: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB0901516A87CC5246DB96271DFBBF0@DM5PR2101MB0901.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)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0901; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0901; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(376002)(346002)(396003)(366004)(189003)(199004)(99286004)(68736007)(10290500003)(25786009)(86612001)(6116002)(66066001)(97736004)(3846002)(76176011)(6512007)(54906003)(6436002)(4326008)(53936002)(105586002)(110136005)(6486002)(3280700002)(1076002)(107886003)(8676002)(10090500001)(2501003)(81156014)(81166006)(5660300001)(14454004)(186003)(3660700001)(102836004)(7736002)(2906002)(26005)(5250100002)(36756003)(478600001)(446003)(316002)(6506007)(2616005)(106356001)(8936002)(11346002)(575784001)(22452003)(2900100001)(86362001)(486006)(476003)(305945005)(72206003)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0901; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 9UddJGTitEqP+TpEvfL+4t7E4hx0CnvPewGW0DLkiHIdFPmeuR8gSg8ztYlyetc5M6CTW8IZe+9+wgmnfnMftlIcGlIpxmblSsoRY1g5JMQDuS7Pc0iM9AdIxS31iixs9n0wKIhgrOWWjpqlJ4Z1Hpt/8JiIZT7/QzRrG3njWCwB+AYIE1LEpSXq/wobA/VMcZ9sK8t/ylX7J5eC38KTFuLLQ8Ch71kwM5dIYfLS3lTS7WnNY4tXcomnpArpUsKFXJ3sX+W70xyQ1dZI2aj0hegrE5e6+E5IyrStRTuvg+zkiF+Qo3NGNhAfdpaoAAXG24z/bnXLxMvgZ1ahaE/L6KA3XDhPA02SASe22VOWamAmlnhxb7bJV7M3/2woFvxifjA8/oKr7MYHHMd0qd0kdG3LjXZy+Yn9KnmZrl3yugA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <B8E6478831FCA84A9A911B19530CF65B@namprd21.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d041c08-9fe6-4d0e-70af-08d59db2a1f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:41:28.2834 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0901 X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f06fd2018651..4de23979d0ff 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4025,13 +4025,14 @@ long kvm_arch_vm_ioctl(struct file *filp, 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; }