Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1650922ybk; Thu, 21 May 2020 11:50:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBqQakcORC9I7UalWOi+XQHaG9w11wr8yoyxREmBcUgNkG/qAPH+FEQl2Hw0zsN+4ym5dQ X-Received: by 2002:a17:906:d215:: with SMTP id w21mr4782147ejz.383.1590087020908; Thu, 21 May 2020 11:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590087020; cv=none; d=google.com; s=arc-20160816; b=RqyVcuQvIs+lT7OTWTq05OxK56ULlUA0ZwO27EKjtEH19rGf6+VY7Mve91Ant3BgL5 miB/treePlwy46mEukOPinWGDtM4oZkAQ6KyH1ca1mmNoHXl+sxfSpwhTnfeUjpuHg1a 005LpK3dObqcLhaRYeqzhZXkh84Czg82oyL9dpsRd/ieAVFm4FxY0Sn4zk+g0LSAACLL BCinb27HNdbFBwpUaUpKjzpxsW7Uutz9DdDiDXEpcsIYEhq+S4JcQ5KYTT0wkiOGqZ7N Fr1Zr4zub1CMM0bh2+VlFKIiFfgEmTzzkNsD2X3ruzibXV2FPc2m77GM9Uid07rZpeEG u8uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5vLYKuXa+UUaGWnNM1CRpSE460GjOXDkyZjKCdT783g=; b=KPWarEcksEf/FtN7xzI7YRPIl+BMut1jaK/ILNbwSmTgMIUD94qM+vyT+A5Y8wFAaO vS3dnJnM+FZpKqr6nDdPgCO4gxJeazrDH9u9p+e6c+5g1Ll4kl0HDiPyykPJ0Iy3i9Jj mLGKYJjoajOJRMpRlkhUyUCs75bpcftr0/RpUSCLmIwDumsuXsIew1eXICuIx86Gb7A8 gdRH9aqeUgP60K6PX9fj7SBE1uMyi8qL59E7qfHXgXg+2JaMie//aQCfOlGe3Bn9uuVs 0H+od7z50rT/ClNhUfMZo9Rvv0qg7moq8jfUhURlaXY3GepHM+tXADj/ieSpmy6iX2+s dyRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=0KHI1XI5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si3465308eds.355.2020.05.21.11.49.57; Thu, 21 May 2020 11:50:20 -0700 (PDT) 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=@messagingengine.com header.s=fm2 header.b=0KHI1XI5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729800AbgEUSqH (ORCPT + 99 others); Thu, 21 May 2020 14:46:07 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40955 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbgEUSqH (ORCPT ); Thu, 21 May 2020 14:46:07 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 281AC5C00B3; Thu, 21 May 2020 14:46:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 21 May 2020 14:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=5vLYKu Xa+UUaGWnNM1CRpSE460GjOXDkyZjKCdT783g=; b=0KHI1XI5mrzKJUKfroMclt caUTTAnia0Qon+dGzPX/wRI2SOknY4bkod/GdNT2f0RxPuXNVd0BEtZgt55udaDf psD22x2ec17tAnU0Yj+HH7vbun1DKimUWva0SX98SBrnfc+r2A9QH3ZzG+BrXP3U wSI5kv86DwsKayk9LwQhW9Z83wimA2a0MyznQzwiCWiJmKaG+c+HaIoNpRDmcMWv 5wC2CUwc1BUCrhGDOa1TjfPFI9i8lGEZZPI4D6IJhW3VxSgztcJ1E5h1UtxHNErt Z9PmKeo7z5/0/H28EerMW6KqkFT/1mvAlxwpsDO2UJH+ChYN2FkLCIIcZ7J/Ra0g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduuddguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofgrrhgv khcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinh hvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnhepieek geeivdelkeejgeetkeelgeevgefhfeeghfffieehudeuteekueetgeetiefgnecuffhomh grihhnpehmrghrkhhmrghilhdrohhrghenucfkphepledurdeihedrfeegrdeffeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrh gvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: Received: from mail-itl (unknown [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id C1469306645C; Thu, 21 May 2020 14:46:04 -0400 (EDT) Date: Thu, 21 May 2020 20:46:02 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Boris Ostrovsky Cc: Juergen Gross , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Stefano Stabellini , stable@vger.kernel.org Subject: Re: [PATCH] xen/events: avoid NULL pointer dereference in evtchn_from_irq() Message-ID: <20200521184602.GP98582@mail-itl> References: <20200319071428.12115-1-jgross@suse.com> <30719c35-6de7-d400-7bb8-cff4570f8971@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KR/qxknboQ7+Tpez" Content-Disposition: inline In-Reply-To: <30719c35-6de7-d400-7bb8-cff4570f8971@oracle.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KR/qxknboQ7+Tpez Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] xen/events: avoid NULL pointer dereference in evtchn_from_irq() On Thu, May 21, 2020 at 01:22:03PM -0400, Boris Ostrovsky wrote: > On 3/19/20 3:14 AM, Juergen Gross wrote: > > There have been reports of races in evtchn_from_irq() where the info > > pointer has been NULL. > > > > Avoid that case by testing info before dereferencing it. > > > > In order to avoid accessing a just freed info structure do the kfree() > > via kfree_rcu(). >=20 >=20 > Looks like noone ever responded to this. >=20 >=20 > This change looks fine but is there a background on the problem? I > looked in the archives and didn't find the relevant discussion. Here is the original bug report: https://xen.markmail.org/thread/44apwkwzeme4uavo --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --KR/qxknboQ7+Tpez Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAl7GzGkACgkQ24/THMrX 1yygDAf/RzUmiuF2TM7HvZsoGQmZxnc+ZrcCx9F+FXoYyHUYYjyoj5hnMWPJit1g GPLie+6PbPhjOyC+6tYK9TGgEv2HxyO8PNLTWDRDRnxrf8rBTqMKRvcbm8FYZV+J 9baXNldjf6TvgddPwik9bqetHX+e/QpyeovpcSOzbP1dXKWnxUbypEinsiNxtT97 vkiW/LfYtzb8arPdFVmVl/9YPmvk+080mm2eTQYARy7qVlM70zqsvtWBYQYFcxd2 N7OH7AoSARVyncbIT1B5bTrte9HTFB4ewJ1CvTvc3wOGDbUCiyVz7nDxNRQo6/S/ 3x7RfR3nRBE3RwMeEj2cAdsgzOkI9g== =oact -----END PGP SIGNATURE----- --KR/qxknboQ7+Tpez--