Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1459274rwb; Thu, 19 Jan 2023 10:54:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXuLc2at7NDOoCALPaYIuy/1EpnrOaR+TbhfNbuYedpjs14HpRxRu1nOSUAsX7/7+cFnZbVh X-Received: by 2002:a17:902:da91:b0:188:760f:d831 with SMTP id j17-20020a170902da9100b00188760fd831mr17330827plx.7.1674154478801; Thu, 19 Jan 2023 10:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674154478; cv=none; d=google.com; s=arc-20160816; b=FtiDl5Gra3gGx2w8FcNVedGlIygS5k9FRPtClFuypIT/P7ORcrZBxe9qbTIcwOQgZW EelQIW2FTywgVsr74SpNFque+2tgI4Oj3L8E4ZPISfycry/OXZg6/7xWB7jFTtXQvDW8 Ue5omTKKtk9z2ahFzjDuKlGEovEBNpE/FKAwdjmyFEL6/YrXd9C+2vXshpVjSLH2ENP6 shnnvgY2v4hPlxq26eTn2Aj87ojg+fxY6r6kqG1hIyG+N5HecTexIA2EhdpxG4NhcQos aTsFYYZ4aNXT+b7kzirGEVrh2Mag4ul2LXUZhsaCcPXWXEPOJrr0VNfxS1Wi6dex1H8j ChBg== 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=sI+gbGGxoujv4j+rj39AeAPq1/KAVRo4Pqdvy0ToQzU=; b=pxYRwXSyjh9tLj3rAsY5QEoFuBdmFJntQ5JnUjercsCTxBSXopIOjpltl1MLRtvqaA RcG7cpf3DdZO8xNSKGHG5epfBzHaQerPqkWVr6SJzbdtULgBopFnZZMVDVdYteNdXQTO HOl163h7QijC3/z3WbWm8XNjQs7RNlJhglOe/ezEA6/36/gseZR1YWmkfSpjCfXIhLvN eXF7LYM76eZedajy/9TYeancGPFxVAo/yVXjYcQqvHh9zgOSuqM13mBG39bWbp6jE8NN cZsSrY7XuaUPuvJr3SqAs2hoBlCr+rn0/So4v1nzyjf1sPx/vjl9O9kn9TKnyMbQ5b5C v4Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=G40gK9Lg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a170902ecce00b0019441960a48si30366478plh.236.2023.01.19.10.54.32; Thu, 19 Jan 2023 10:54:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=G40gK9Lg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230003AbjASSMh (ORCPT + 46 others); Thu, 19 Jan 2023 13:12:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjASSMf (ORCPT ); Thu, 19 Jan 2023 13:12:35 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8EA126B4 for ; Thu, 19 Jan 2023 10:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674151953; x=1705687953; h=resent-from:resent-date:resent-message-id:resent-to:from: to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZQv7ckOWXUugQsn2n86dUai3CBZCoAI9JjoSBknnenY=; b=G40gK9LgIlaBkD6wHTWDyIcejY762FAzLUh3F0kh9DXW/m5dG3+vSTk5 Fb6kI4shOS7j5ICPsJhPNCLLlCxAgmhwIUHxGzlTMZe/wbuZIcJ4hB/n/ XnFNF2WN61m9Qxk0NxQ5td7ZXZO/PWrZrHFi+qwofB4cZZvzLm7hJW5/s tjwHuWEszPLfLtrUV2gYGpJd7I47HaJ6CPpE4a2MTaa1y3wON8+ld4mYC hQVhluLeMi7KYB2o7/vV3igpbgulr2GSh8RV0lbSOagAxkRFyIbcYQAeo qOafpdLnHxsdE4k2e+1r3ExbhZzIDyqbwhftr2/XagYuyHBsSbbSYO80V Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="305736630" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="305736630" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 10:12:33 -0800 X-ExtLoopCount2: 2 from 10.237.72.184 X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="802737551" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="802737551" Received: from ubik.fi.intel.com (HELO ubik) ([10.237.72.184]) by fmsmga001.fm.intel.com with ESMTP; 19 Jan 2023 10:12:32 -0800 Received: from ash by ubik with local (Exim 4.96) (envelope-from ) id 1pIZOX-00EPGt-1H for linux-kernel@vger.kernel.org; Thu, 19 Jan 2023 20:12:13 +0200 X-Original-To: alexander.shishkin@linux.intel.com Received: from linux.intel.com [10.54.29.200] by ubik.fi.intel.com with IMAP (fetchmail-6.4.29) for (single-drop); Thu, 19 Jan 2023 15:59:02 +0200 (EET) Received: from fmsmga005.fm.intel.com (fmsmga005.fm.intel.com [10.253.24.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 77D81580AE0; Thu, 19 Jan 2023 05:57:03 -0800 (PST) X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="988993903" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="988993903" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 19 Jan 2023 05:57:01 -0800 From: Alexander Shishkin To: mst@redhat.com, jasowang@redhat.com Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, elena.reshetova@intel.com, kirill.shutemov@linux.intel.com, Alexander Shishkin Subject: [PATCH v1 0/6] Harden a few virtio bits Date: Thu, 19 Jan 2023 15:57:15 +0200 Message-Id: <20230119135721.83345-1-alexander.shishkin@linux.intel.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 Hi, Here are 6 patches that harden console, net and 9p drivers against various malicious host input as well as close a bounds check bypass in the split virtio ring. Changes since previous version: * Added Christian's R-B to 3/6 * Added a speculation fix per Michael's comment on the cover letter * CC'ing lkml Alexander Shishkin (3): virtio console: Harden control message handling virtio_net: Guard against buffer length overflow in xdp_linearize_page() virtio_ring: Prevent bounds check bypass on descriptor index Andi Kleen (3): virtio console: Harden multiport against invalid host input virtio console: Harden port adding virtio 9p: Fix an overflow drivers/char/virtio_console.c | 19 ++++++++++++------- drivers/net/virtio_net.c | 4 +++- drivers/virtio/virtio_ring.c | 3 +++ net/9p/trans_virtio.c | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) -- 2.39.0