lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170824123226.57twp5sdh246l5kz@mwanda>
Date:   Thu, 24 Aug 2017 15:32:26 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Baoquan He <bhe@...hat.com>
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        joro@...tes.org
Subject: Re: [PATCH] iommu/amd: Check if domain is NULL before dereference it

Take a look at this code for example.  But all the places which call
get_domain() are the same:

drivers/iommu/amd_iommu.c
  2648          page = virt_to_page(virt_addr);
  2649          size = PAGE_ALIGN(size);
  2650  
  2651          domain = get_domain(dev);
                         ^^^^^^^^^^^^^^
imagined get_domain() returns NULL.

  2652          if (IS_ERR(domain))
  2653                  goto free_mem;
  2654  
  2655          dma_dom = to_dma_ops_domain(domain);
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
This will Oops.

  2656  

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ