Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp723636pxu; Wed, 2 Dec 2020 01:28:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1tzxq16/hQSa5CMYx04RMiJKMwpwWCeosRXwCv/B1CMWjU/gx57ZW2Dr0iesvTNWeHvk0 X-Received: by 2002:a17:906:d72:: with SMTP id s18mr1543458ejh.110.1606901307293; Wed, 02 Dec 2020 01:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606901307; cv=none; d=google.com; s=arc-20160816; b=SMmcwPXw5nIUtwCYvrTNHzg87nYPJSJDLFn8qwABquqdapakrJJ2RIT8bPMSoa0lGP qovjq3/ZypuujAShFWDJ9u3ddzdNAToYPSOlLEIfKtmLns3febmGO5G/5xvldzOSpqZW GxaI9yc3KCYrdUXMCoVy/Ob6HJVdeX1kMW5ZQz1xFzNrBkk/Tt9YtPovo2+8eI+DrfwC 0Tsv6scTxEakfMDeDiWvmYZ4kWh8DmW488661rOGSDxfpfNubouBsYWWDlm0G+szBdC7 jcAR104ZoyTZVXUqIQcKL3X/msV6HZEwA3Wuws/6sDRpwJ7uz2jLgKk3EJEev58a88vE Ns4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZwrjU6762QSJwiWh0r8/mVMOyaJCyDaBwDy1dg3d6Is=; b=ckUz7ckHB1e/kahfA1IQ+xVWfBi0R74d5YX40XFnN7+d1VwGyIX0ezGgZNiQzwJQL6 WZtAt/nhka/JQ0SsUgeggVWMYK2NmKa+IuYJYui5umuDXayNG8gvgu686Ay5eC7ljiVJ xo9SUwEE/vEZOkgx1AWaXlKdABY4KOl8Hko/r4mshYx34dZAvj1g/amugvxz48RnzVhe AC3MhacpuDGQyz86dC1c4SitkCm9jZl5xrSzV70rexwWdyFgkcANm/i5KlMq7Foywmac SA80MzTtOUpDm9zswT57BM0uvGDaShzwLG3QrDJiSTmp5P66NaJF02boXstXfs//Q2Zl PWQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BBa+/wYa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si697081edv.513.2020.12.02.01.28.03; Wed, 02 Dec 2020 01:28:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BBa+/wYa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729258AbgLBJXX (ORCPT + 99 others); Wed, 2 Dec 2020 04:23:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728238AbgLBJXW (ORCPT ); Wed, 2 Dec 2020 04:23:22 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09A42C0613D4; Wed, 2 Dec 2020 01:22:36 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id k14so2728705wrn.1; Wed, 02 Dec 2020 01:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZwrjU6762QSJwiWh0r8/mVMOyaJCyDaBwDy1dg3d6Is=; b=BBa+/wYaigbPVikShx/N9TYS3+S8E6FW3coJHXiUOFz2RFdhVF+ZVIm7Htrt8//kfe 7+gkNYAoxad3xbeivbEuhUQZRFTrDtcps9Usn0XHPmiXxfnKvoBhEy28GSkqambtabzS qKpJSqq/2pEo/P0y+X54ulGylWlb1fhitPLQeCIGMkHxg50zKk3Sx/W9+IoLR9DmD6dZ l2EyNA0MExEmMAk8Rym0E89OcioCIy4ryg1ZCWZxFNi8SKP/yevuoKVLbxGlMy0rj/9r LZ/UlvLS/ZMQEd/Aarl57kQujQXwQ3hDSMSTCsKM90L60PUx28WYGus1BfZdO0OZ2Q36 DhnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZwrjU6762QSJwiWh0r8/mVMOyaJCyDaBwDy1dg3d6Is=; b=GMkr6/xWNg91WddU7mIW28NLGqLXru0Ea8oF6mIEBX62Zu6kLsZLDgwVRXIDqI1kOD Bq/Dn8Ua4RGY9fYm1L313GEtNB1LUairyajkEXWJue3FLKFZSI6nI38UD9N6Tr1VJkQw Qgo607ERAIdwp1uH1IjO7LYpyIkz/3fHlx+wfQIFYcH7AFNQp4r1HjiI8ifLWM5Iqcgj Ny3uZaQlRlWGSlOCPziU8oc+P/84JrR2DliM0R+CFGc8Rg/KSi1h36YIelc+iEfRirUD MkTLbRmtsC8R7aSnjKe+G9vG437Nehgb9qhpdJMUnUs8IQocbqIz1skoseZkaurB3MDM OYPQ== X-Gm-Message-State: AOAM533gwEQJIz+BgQAVuR/7R/CryV3r8oHB2VWeB4KBkfuXe6blKRHw VYuZ5TEOB7+4Nc72LiQwiEAX/fBAWYWmCg== X-Received: by 2002:adf:93e6:: with SMTP id 93mr2177456wrp.197.1606900954124; Wed, 02 Dec 2020 01:22:34 -0800 (PST) Received: from andrea.corp.microsoft.com (host-95-239-64-30.retail.telecomitalia.it. [95.239.64.30]) by smtp.gmail.com with ESMTPSA id e27sm1535936wrc.9.2020.12.02.01.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 01:22:33 -0800 (PST) From: "Andrea Parri (Microsoft)" To: linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Michael Kelley , Juan Vazquez , Saruhan Karademir , "Andrea Parri (Microsoft)" Subject: [PATCH v2 0/7] Drivers: hv: vmbus: More VMBus-hardening changes Date: Wed, 2 Dec 2020 10:22:07 +0100 Message-Id: <20201202092214.13520-1-parri.andrea@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This is v2 of [1], integrating feedback from Juan and Wei and adding patch 4/7 (after Juan's suggestion). Changelogs are in the patches. Thanks, Andrea [1] https://lkml.kernel.org/r/20201118143649.108465-1-parri.andrea@gmail.com Andrea Parri (Microsoft) (7): Drivers: hv: vmbus: Initialize memory to be sent to the host Drivers: hv: vmbus: Avoid double fetch of msgtype in vmbus_on_msg_dpc() Drivers: hv: vmbus: Avoid double fetch of payload_size in vmbus_on_msg_dpc() Drivers: hv: vmbus: Copy the hv_message object in vmbus_on_msg_dpc() Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind() Drivers: hv: vmbus: Resolve race condition in vmbus_onoffer_rescind() Drivers: hv: vmbus: Do not allow overwriting vmbus_connection.channels[] drivers/hv/channel.c | 4 +-- drivers/hv/channel_mgmt.c | 53 +++++++++++++++++++++++++++------------ drivers/hv/hyperv_vmbus.h | 2 +- drivers/hv/vmbus_drv.c | 43 ++++++++++++++++++------------- include/linux/hyperv.h | 1 + 5 files changed, 67 insertions(+), 36 deletions(-) -- 2.25.1