Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

OSR Seminars


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 9  
12 Mar 18 08:09
Jithin P
xxxxxx@gmail.com
Join Date: 12 Mar 2018
Posts To This List: 3
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

Hi, I am facing NTSTATUS=80070005 (ACCESS_DENIED) while calling WdfIoTargetOpen with symbolic name. Calling this WdfIoTargetOpen from UMDF driver with the symbolic name of a KMDF driver. Does any permissions required through inf .?? Below is the code snip ,, .... .... cr = CM_Get_Device_Interface_List((LPGUID)&KMDF_driver_GUID, NULL, DeviceInterfaceList, DeviceInterfaceListLength, CM_GET_DEVICE_INTERFACE_LIST_PRESENT); ... ... //obtained symbolic link //create and open IO target status = WdfIoTargetCreate( device, WDF_NO_OBJECT_ATTRIBUTES, &iotarget ); if (!NT_SUCCESS(status)) { TraceInfo(DBG_INFO_HIGH, "%!FILE!::%!FUNC!:: WdfIoTargetCreate FAILED:%!status!", status); return FALSE; } TraceInfo(DBG_INFO_HIGH, "%!FILE!::%!FUNC!:: SymbolicLink:%ws", PublisherSymbolicLinkName.Buffer); WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME( &openParams, &PublisherSymbolicLinkName, STANDARD_RIGHTS_ALL ); status = WdfIoTargetOpen( iotarget, &openParams ); if (!NT_SUCCESS(status)) { WdfObjectDelete(iotarget); TraceInfo(DBG_INFO_HIGH, "%!FILE!::%!FUNC!:: WdfIoTargetOpen FAILED:%!STATUS! ", status); return FALSE; } ..... ... Please help me to identify what I am missing here.
  Message 2 of 9  
12 Mar 18 11:46
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11963
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

xxxxx@gmail.com wrote: > I am facing NTSTATUS=80070005 (ACCESS_DENIED) while calling WdfIoTargetOpen with symbolic name. Calling this WdfIoTargetOpen from UMDF driver with the symbolic name of a KMDF driver. Does any permissions required through inf .?? Is the KMDF driver one you control?  Are you able to open it from a regular user-mode application?  Remember that not every driver is designed for file access.  The KMDF driver establishes its own security via SDDLs.  If the SDDL doesn't permit user-mode access, then UMDF can't access it. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 3 of 9  
12 Mar 18 11:52
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10209
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

IIRC the KM driver must explicitly be configured to allow UMDF opens. There is an INF setting for this somewhere... d -----Original Message----- From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> On Behalf Of xxxxx@probo.com Sent: Monday, March 12, 2018 8:46 AM To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: Re: [ntdev] WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED) xxxxx@gmail.com wrote: > I am facing NTSTATUS=80070005 (ACCESS_DENIED) while calling WdfIoTargetOpen with symbolic name. Calling this WdfIoTargetOpen from UMDF driver with the symbolic name of a KMDF driver. Does any permissions required through inf .?? Is the KMDF driver one you control?  Are you able to open it from a regular user-mode application?  Remember that not every driver is designed for file access.  The KMDF driver establishes its own security via SDDLs.  If the SDDL doesn't permit user-mode access, then UMDF can't access it. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc. --- NTDEV is sponsored by OSR Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fshowlists.cfm%3Flist%3Dntdev&data=04%7C01%7CDoron.Holan%40microsoft.com%7C65b 1706d8f614e4ee8e108d5883055ec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636564 663539772483%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwifQ%3D%3D%7C-1&sdata=6M3o%2BjcUGmcj8Sgs8stLBpJn0FZ0WLbCrm7V4yEQPLw%3D&rese rved=0> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fse minars&data=04%7C01%7CDoron.Holan%40microsoft.com%7C65b1706d8f614e4ee8e108d588305 5ec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636564663539782487%7CUnknown%7CT WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdat a=%2BNV7snuIP%2F8XKmBF9wxAtJdVFkdSPAcx1px9ruiWozU%3D&reserved=0> To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fpage.cfm%3Fname%3DListServer&data=04%7C01%7CDoron.Holan%40microsoft.com%7C65b 1706d8f614e4ee8e108d5883055ec%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636564 663539782487%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwifQ%3D%3D%7C-1&sdata=HWfFzjip%2FguRn5iwUqn3ruQd5%2FrwvYMnSPfewiBzJa0%3D&re served=0>
  Message 4 of 9  
13 Mar 18 12:55
Jithin P
xxxxxx@gmail.com
Join Date: 12 Mar 2018
Posts To This List: 3
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

Hi Tim/Doran, KMDF driver provided the permission to UMDF drivers through SDDL (L"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;UD)"), but this didn't helped to solve this issue. unfortunately I am unable to find out any other inf settings for kmdf drivers in wdf directives ( https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/specifying-wdf-dire ctives-in-inf-files ) please suggest me how to fix this.
  Message 5 of 9  
13 Mar 18 13:28
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11963
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

xxxxx@gmail.com wrote: > KMDF driver provided the permission to UMDF drivers through SDDL (L"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;UD)"), but this didn't helped to solve this issue. What kind of a device are you trying to open?  Some devices only allow one open at a time.  Keyboard and mouse drivers, for example, only allow one open, and the HID subsystem uses it up. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 6 of 9  
13 Mar 18 13:46
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10209
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

My mistake in what the policy is. The policy is to control if a umdf driver can be opened by KM. See the section UmdfKernelModeClientPolicy in this page https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/specifying-wdf-dire ctives-in-inf-files Can a normal um application open a handle to the km driver? d Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@lists.osr.com> Sent: Tuesday, March 13, 2018 9:54:51 AM To: Windows System Software Devs Interest List Subject: RE:[ntdev] WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED) Hi Tim/Doran, KMDF driver provided the permission to UMDF drivers through SDDL (L"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;UD)"), but this didn't helped to solve this issue. unfortunately I am unable to find out any other inf settings for kmdf drivers in wdf directives ( https://na01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fdocs.microsoft .com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fwdf%2Fspecifying-wdf-directives-in-in f-files&data=04%7C01%7CDoron.Holan%40microsoft.com%7C244b9d5386254cb2db2c08d58903 23dd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636565568933668077%7CUnknown%7C TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sda ta=zOzH82PXk704Pg4zy%2FbIXTxsFeLkJeXNZHvoP9HWvIw%3D&reserved=0 ) please suggest me how to fix this. --- NTDEV is sponsored by OSR Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fshowlists.cfm%3Flist%3Dntdev&data=04%7C01%7CDoron.Holan%40microsoft.com%7C244 b9d5386254cb2db2c08d5890323dd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636565 568933668077%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwifQ%3D%3D%7C-1&sdata=fQvT9034xuSrQcb4ahyXx9z1juzQ04%2B4ayu4e3dedAI%3D&rese rved=0> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fse minars&data=04%7C01%7CDoron.Holan%40microsoft.com%7C244b9d5386254cb2db2c08d589032 3dd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636565568933668077%7CUnknown%7CT WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdat a=PVB2neq38t%2Fd%2FbBix43SVOSdhalmKSCJYj6fujodZKM%3D&reserved=0> To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fpage.cfm%3Fname%3DListServer&data=04%7C01%7CDoron.Holan%40microsoft.com%7C244 b9d5386254cb2db2c08d5890323dd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636565 568933668077%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 Ik1haWwifQ%3D%3D%7C-1&sdata=lHYaFhCuhhPzmKXCTKf5dk%2FHDOcTmJNtzcKeBFnjh0E%3D&rese rved=0> --
  Message 7 of 9  
13 Mar 18 14:14
Peter Viscarola
xxxxxx@osr.com
Join Date:
Posts To This List: 6192
List Moderator
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

Do you really want STANDARD_RIGHTS_ALL? Can you do with less... you're calling from user-mode. I suggest you ask for something more reasonable like (ULONG)(GENERIC_READ | GENERIC_WRITE). Can you show us the name of the device, the whole string please, that you're trying to open? Have you checked the effective protection on the device you're trying to open with a utility like WinObj or our (venerable) GUI Obj Dir? Setting device object protection is *not* simple. Peter OSR @OSRDrivers
  Message 8 of 9  
23 Mar 18 09:13
Jithin P
xxxxxx@gmail.com
Join Date: 12 Mar 2018
Posts To This List: 3
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

Thank you Peter and Doron, Using access mask as (ULONG)(GENERIC_READ | GENERIC_WRITE) solved the issue.
  Message 9 of 9  
23 Mar 18 12:24
Peter Viscarola
xxxxxx@osr.com
Join Date:
Posts To This List: 6192
List Moderator
WdfIoTargetOpen failed with NTSTATUS=80070005 (ACCESS_DENIED)

>Using access mask as (ULONG)(GENERIC_READ | GENERIC_WRITE) solved the issue. Gooooooal! Peter OSR @OSRDrivers
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 17:48.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license