Keyboard filter messes up control software

This might be a long shot, but I’m hoping one of you brilliant minds can
think of something:

I’ve had a bunch of users mentioning that installing my keyboard filter
driver causes their keyboard’s control software to crash or stop working. To
resolve the issue, it turns out they need to just run the control software
as Administrator.

I’m quite baffled why this makes a difference and I’m unsure whether this
means I have a bug in my filter or if the issue is with the control
software. I’ve seen it happen to both Logitech and Razer devices.

Any ideas what could be causing this?

Since you’ve gone several days without any sort of reply, I’ll take a shot in the dark here because I don’t have much info to go on.

Given that you’ve said if the management software is run as administrator it works, I’ll guess that something you’re doing is interfering with the device object rights.

http://msdn.microsoft.com/en-us/library/windows/hardware/ff540750(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/hardware/ff542063(v=vs.85).aspx

I don’t know if youre a WDM or WDF driver or what you’re doing in AddDevice. That seems like the most likely place to find your problem, but I could be way off here.

What is the “control software” using? WMI? DeviceIoControl?

James

My filter is a WDF driver based on the kbfiltr sample. Like the sample, I
create a PDO in order to be able to communicate with the driver from
user-mode.

I know the sample does the following when creating the PDO:

//
// Since keyboard is secure device, we must protect ourselves from
random
// users sending ioctls and creating trouble.
//
status = WdfDeviceInitAssignSDDLString(pDeviceInit,
&SDDL_DEVOBJ_SYS_ALL_ADM_ALL);

My thought is that the control software somehow enumerates the various
devices connected to my filter and try to open a connection to each one,
which will fail with error 5 if they’re not running as Administrator. I
don’t know if that’s the case, of course, but if it is, I don’t know what
else I can do. I don’t think it’s a clever idea to let anyone talk to my
filter since they can send instructions to it that affect the filtering
process.

I guess I could try creating a test build of my driver that grants everybody
access to the PDO and see if that makes a difference, though.

Apart from the above, I don’t know what else my filter could be doing that
would require the control software to be running as Administrator.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-486087-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Friday, December 09, 2011 4:00 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Keyboard filter messes up control software

Since you’ve gone several days without any sort of reply, I’ll take a shot
in the
dark here because I don’t have much info to go on.

Given that you’ve said if the management software is run as administrator
it
works, I’ll guess that something you’re doing is interfering with the
device
object rights.

http://msdn.microsoft.com/en-
us/library/windows/hardware/ff540750%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-
us/library/windows/hardware/ff542063%28v=vs.85%29.aspx

I don’t know if youre a WDM or WDF driver or what you’re doing in
AddDevice. That seems like the most likely place to find your problem,
but I
could be way off here.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

James,

I’m not sure on that, unfortunately, since it’s proprietary software
(Logitech and Razer) and I don’t have the software locally to attach a
debugger. As I mentioned in my other reply, I’m wondering if the control
software is trying to do something with my PDO, which requires admin privs.
(Why the software would do that, I don’t know…)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-486091-
xxxxx@lists.osr.com] On Behalf Of xxxxx@mindspring.com
Sent: Friday, December 09, 2011 4:07 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Keyboard filter messes up control software

What is the “control software” using? WMI? DeviceIoControl?

James


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> else I can do. I don’t think it’s a clever idea to let anyone talk to my

filter since they can send instructions to it that affect the filtering
process.

So, it is OK to only allow administrators to do this. This is already the case. Task done.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Haha, what kind of reply is that Maxim :slight_smile:

It’s a problem because installing MY software causes somebody ELSE’S
software to break – even if the error isn’t on my end, I still need to
determine the cause so I can (hopefully) do something to improve the
situation.

What I’m trying to determine here is 1) am I doing everything correctly,
i.e. it’s not a stupid mistake on my part or an assumption in the sample
that I’m unaware of, and 2) what exactly is breaking. If it does indeed turn
out to be the PDO that’s the problem, I’m very curious why e.g. Logitech’s
control software would enumerate filters in the input stack AND look at PDOs
connected to those filters. It seems pretty odd to me.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-486180-
xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Sunday, December 11, 2011 9:50 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Keyboard filter messes up control software

> else I can do. I don’t think it’s a clever idea to let anyone talk to my
> filter since they can send instructions to it that affect the filtering
> process.

So, it is OK to only allow administrators to do this. This is already the
case.
Task done.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer