Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4570455ioa; Wed, 27 Apr 2022 06:42:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaRTQgx8+ZyL4Q1vU9ndovlSkC39X7i33q1KSBhtK1yJGmKvgLEydd1gOg6FMKIZQO7Uyc X-Received: by 2002:a05:6a00:1683:b0:4f7:e497:6a55 with SMTP id k3-20020a056a00168300b004f7e4976a55mr29801020pfc.21.1651066970292; Wed, 27 Apr 2022 06:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651066970; cv=none; d=google.com; s=arc-20160816; b=YKQ5xdaD4hWHkun41Da9wTyJlIaoBQ5VRr/VBs0wZVwCeA/v11o3nkCUrs93J5j9AV ++I6G6fmSSOco4TaPl+mqObsYe6ZIsfK7QJNQyHb6RZB1ze6Pp8KbVy7lqYozKqb8hdh gEBPlApuG3cwDlpmDPA0IpIa0XXSEXphR2IFkn5mT9+L7mnklLb42BRHMC+8tolIYZl5 FqXCNz80zGeYkftzbgvR16PMZ3Hb1VHbQ9Q7bmk5Z3AfMRRw/7KJ1+Qx+8w5oIDnoG/G YdKtY0xr3/tIfqcG22f5ssJ3ZEVN7DhfmSe0+q7amZ5LWDL3cKOo313UgNwcTCT7is5d 4CMw== 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=Y1MPivJ71DUTG2ptog6r0HYX3a/d3mDJNSwkKFhB8Qs=; b=kUhCpCpB1RkreDJgsL2fkXldU+kXC2LYZq+oYMFL9lDL8wxGpqPEXE8XhspYiS07DN 9hsdIFxzJuMiM60jcE7Pb8+lhfmL6MVh8F7hiXnQ4ie8025nZua7+lxodTFkvB4EZN1p qNxiKhx9NPTAEJaIE07/Lw3MdUK7dZbtHNTzrXOoGmF4bT85+FpU5Rt9aZ6lzLbgFZ0u 2ZUtmoraF1/aiI1BaKuSDQgA/cl4s7JJ7MBZ0lCLshnU/eB1qC+nrpcoyvaffUnlQ8gy 8uak/fB2AA7R21JtOCPKTJbTM81KgQsOTiyxkrIOma0fei095ibuwDz0ZIrjYst5dZ5Q UiwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=J9z7Wkh4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id pq14-20020a17090b3d8e00b001d9654a4447si1689037pjb.132.2022.04.27.06.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 06:42:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=J9z7Wkh4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 580C6C848C; Wed, 27 Apr 2022 06:14:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235542AbiD0NQ5 (ORCPT + 99 others); Wed, 27 Apr 2022 09:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235375AbiD0NQw (ORCPT ); Wed, 27 Apr 2022 09:16:52 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B7E4993B; Wed, 27 Apr 2022 06:12:56 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id b24so1877894edu.10; Wed, 27 Apr 2022 06:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y1MPivJ71DUTG2ptog6r0HYX3a/d3mDJNSwkKFhB8Qs=; b=J9z7Wkh4fQH+gqjh4dmtAu7+WFRRxrFjaU7d33Y/DOgeyuEwb+ExMM4P9rm14PkjKH 0gjK+bceotqd1JduXB4AwAMTUB6qgWeth1DJgyoMoP3tTIwzZpUvjxflaH2mp1LWUXDP wkstiAJxqlvImbXJpwYFe+Qec2wTa3JUGv67YZz9iB5PB/sjJA5NxRR8WetY+YgwGJdq IbJY8jRtd61Nw0AdWmq+eh2w0Q5KxNDbpZTM08HQNp8I5X2OT4sQ2dL0bskiqbUMcYnO VG/uJw46E2P8L98HB6oWJqkB5Mpu53oBjlxF40aJQ3bxcBdxiEos0QMFPRdPF/5VI8sk 6xbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y1MPivJ71DUTG2ptog6r0HYX3a/d3mDJNSwkKFhB8Qs=; b=CD87h55WfyjYg+p3ymi3YkFJUldHvygiGbDWW6f69qt8EuyVHTH8hvZOEhyFgvT/oP nu9/P8HjxIcjffC3e4A8ilIObOPP6Myxj5sZql/OB+82BOnzCjCd2UeRsmuK0d+bOjgx EqxZMR8+BJX99u0ryuPtmJtLEYzfrCgRbx7Ilcoe5ClUmGGnc39QcNVmkvxsR4a0UyFh Y8sZhffBqiyKOPD+LtO4XRQxLIzsgj8JCL3AtDQAN6yAAms2ILsbxPRal/7n5ZyKK8Z/ ulJ5bCS8NCwa+xyG5lBb70GcJUsS0YC9d3Xdq9smjoFveZt+Z91oGhj4nEhr3x+ZisgS nX7A== X-Gm-Message-State: AOAM532dA62rpXbX4LtzjpsS8WtDTOlKaT7zC0O/L9rndJm/fsQS1+D2 TpWW6zGYQ1JNNECt2TR932s= X-Received: by 2002:a05:6402:27d0:b0:41a:68bf:ff26 with SMTP id c16-20020a05640227d000b0041a68bfff26mr30392127ede.102.1651065175014; Wed, 27 Apr 2022 06:12:55 -0700 (PDT) Received: from anparri.mshome.net (host-79-49-65-106.retail.telecomitalia.it. [79.49.65.106]) by smtp.gmail.com with ESMTPSA id u6-20020a170906124600b006e843964f9asm6668987eja.55.2022.04.27.06.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 06:12:54 -0700 (PDT) From: "Andrea Parri (Microsoft)" To: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Michael Kelley , Stefano Garzarella , David Miller , Jakub Kicinski , Paolo Abeni Cc: linux-hyperv@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Andrea Parri (Microsoft)" Subject: [PATCH v2 0/5] hv_sock: Hardening changes Date: Wed, 27 Apr 2022 15:12:20 +0200 Message-Id: <20220427131225.3785-1-parri.andrea@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes since v1[1]: - Expand commit message of patch #2 - Coding style changes Changes since RFC[2]: - Massage changelogs, fix typo - Drop "hv_sock: Initialize send_buf in hvs_stream_enqueue()" - Remove style/newline change - Remove/"inline" hv_pkt_iter_first_raw() Applies to v5.18-rc4. Thanks, Andrea [1] https://lkml.kernel.org/r/20220420200720.434717-1-parri.andrea@gmail.com [2] https://lkml.kernel.org/r/20220413204742.5539-1-parri.andrea@gmail.com Andrea Parri (Microsoft) (5): hv_sock: Check hv_pkt_iter_first_raw()'s return value hv_sock: Copy packets sent by Hyper-V out of the ring buffer hv_sock: Add validation for untrusted Hyper-V values Drivers: hv: vmbus: Accept hv_sock offers in isolated guests Drivers: hv: vmbus: Refactor the ring-buffer iterator functions drivers/hv/channel_mgmt.c | 8 ++++-- drivers/hv/ring_buffer.c | 32 ++++++--------------- include/linux/hyperv.h | 48 ++++++++++---------------------- net/vmw_vsock/hyperv_transport.c | 21 +++++++++++--- 4 files changed, 47 insertions(+), 62 deletions(-) -- 2.25.1