From patchwork Thu Apr 28 07:53:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12830143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFE8BC4332F for ; Thu, 28 Apr 2022 07:53:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.316082.534807 (Exim 4.92) (envelope-from ) id 1njyxu-0003kF-2z; Thu, 28 Apr 2022 07:53:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 316082.534807; Thu, 28 Apr 2022 07:53:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njyxt-0003k8-Ut; Thu, 28 Apr 2022 07:53:29 +0000 Received: by outflank-mailman (input) for mailman id 316082; Thu, 28 Apr 2022 07:53:28 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njyxs-0003jr-OX for xen-devel@lists.xenproject.org; Thu, 28 Apr 2022 07:53:28 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 49bd0ef9-c6c8-11ec-8fc3-03012f2f19d4; Thu, 28 Apr 2022 09:53:27 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 354692186F; Thu, 28 Apr 2022 07:53:27 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E100C13AF8; Thu, 28 Apr 2022 07:53:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qNCTNfZHamIoHAAAMHmgww (envelope-from ); Thu, 28 Apr 2022 07:53:26 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 49bd0ef9-c6c8-11ec-8fc3-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1651132407; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3E7uGHyVSRLlv1q/BP8AWtqLSArF2xlrVNvb53ZZO3Q=; b=r3XSYHwZGjPKGDDJnE8y1TzQDS660lC8ubSYtSgv3fDXdqTjp7PRW3yk4VmEGD0yYctRb6 N2Cad7N/zT3wVToO0LIRMHi7Q5SA4KFmR6GDtMgWqzUho8hMvGo68rdSEeCKN5QsOTJ96V OTggVTVRIKMzc52CNcHY5fN1SxcXrG0= From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , "James E.J. Bottomley" , "Martin K. Petersen" Subject: [PATCH v2 0/4] xen/pv-scsi: update header and harden frontend Date: Thu, 28 Apr 2022 09:53:19 +0200 Message-Id: <20220428075323.12853-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Update the Xen PV-scsi interface from the Xen tree and adapt the related drivers to use the new definitions. Harden the frontend driver to be no longer vulnerable to a malicious backend. Juergen Gross (4): xen: update vscsiif.h xen/scsiback: use new command result macros xen/scsifront: use new command result macros xen/scsifront: harden driver against malicious backend drivers/scsi/xen-scsifront.c | 168 ++++++++++++++++++++++------- drivers/xen/xen-scsiback.c | 82 +++++++++++++- include/xen/interface/io/vscsiif.h | 133 ++++++++++++++++++++++- 3 files changed, 340 insertions(+), 43 deletions(-) Reviewed-by: Boris Ostrovsky