[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.13] xen/xsm: flask: Prevent NULL deference in flask_assign_{, dt}device()


  • To: "julien.grall@xxxxxxx" <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>
  • Date: Thu, 10 Oct 2019 15:07:29 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UHUtSMhukJc8MPI7PNYdgxxFGb2d6M3d9oXTPhcKMe0=; b=oU6A25SxWnxRzqNpkmMBVKIz7pA0Tl6XAFd+EI1MHjbYg0tj4nRURKuEpzcILE/+qVsAJW7ZzQj6h95l8wOX15H0nvrx2AgaZiiaJFfARpcUWtbMzqB704ag/q4KSBm2D+EOyq7DO0a+xzOWUa++xof6muF3xryLhHQWKzpMjpSmK/KpN/sjoyF3/0yoIwqDLzYD737i78xSIY9Os4BMZmcDhLl1zkipurTont7Do6YEKPtwBhu+8ryNgRC2GSecQ8NFzN0/EOGBqjF2K4IwWs3DdqYnXA5aNnoq2LQDXkb5WYicddOfUpHCsSkg/BtWxy3fc9MKRYZxU+mr+rkkJA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c5u4sapA0V3hx1KkqiMjXfRUHvWpj3QqSoNOAlUm6Jdg4qs6U+6svu8wjOsm4qtzyTyVvinMntO99oVgBb4xQOIqmg81KtmMVKyt16xufQlPQ74y9ROGDBL62HFGocxzEjrF5ky+2YEB2e19ENk6zIvBcRsdoQBcKc4ArNPO/AA6jElbcc0CpaH9PvptN8AWCU4NyrH1kEBRxo+v+0lfXeX+we9i7tzXhcWZdH9RJEDwQdtT2bzQSen+Y2rFH3cN1Qqjz2toEYMQhLTgM/ptQZnULmyTfiYkfLl3VW/p7M2b10RXrKHs5UwGSyMnNCxSJ7LGOyqjOlFHQxIBQDxkdw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Artem_Mygaiev@xxxxxxxx;
  • Cc: "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "dgdegra@xxxxxxxxxxxxx" <dgdegra@xxxxxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>
  • Delivery-date: Thu, 10 Oct 2019 15:07:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVetLnOcgJQSH9KE+B1/k9VstXPKdSO+mAgAHCB4CAAAVGAA==
  • Thread-topic: [Xen-devel] [PATCH for-4.13] xen/xsm: flask: Prevent NULL deference in flask_assign_{, dt}device()

Hi,

On Thu, 2019-10-10 at 15:48 +0100, Julien Grall wrote:
> 
> On 09/10/2019 12:57, Artem Mygaiev wrote:
> > Hi Julien
> 
> Hi,
> 
> > On Fri, 2019-10-04 at 17:42 +0100, Julien Grall wrote:
> > > flask_assign_{, dt}device() may be used to check whether you can test
> > > if
> > > a device is assigned. In this case, the domain will be NULL.
> > > 
> > > However, flask_iommu_resource_use_perm() will be called and may end
> > > up
> > > to deference a NULL pointer. This can be prevented by moving the call
> > > after we check the validity for the domain pointer.
> > > 
> > > Coverity-ID: 1486741
> > 
> > The correct CID is 1486742
> 
> Hmmm yes. The coverity report e-mail is a bit confusing to read.
> 
> However, I have already committed the patch so we will have to leave with it 
> :(.
> 

I guess the solution could be to fix another one and make a proper
commit comment with cross-reference :)

> Cheers,
> 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.