Bug 1860679

Summary: USBGuard reports IPC Error for HackRF One device
Product: [Fedora] Fedora Reporter: Harish Pillay <hpillay>
Component: usbguardAssignee: Radovan Sroka <rsroka>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 32CC: dkopecek, hpillay, rsroka
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-25 13:33:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of running the usbguard list-devices command, and the subsequent usbguard allow-device # and the resultant error message
none
screen recording of command failures
none
another screencast that shows running the gqrx from the commandline with the strace command and the related errors. I will attach the strace output as well.
none
the strace capture of running gqrx on the commandline none

Description Harish Pillay 2020-07-26 14:13:05 UTC
Created attachment 1702444 [details]
screenshot of running the usbguard list-devices command, and the subsequent usbguard allow-device # and the resultant error message

Description of problem:
I have usbguard enabled and when I plug in a HackRF One software defined radio peripheral, it returns "IPC ERROR:request id=1: SysFSDevice: (rc = write(fd, &value[0], value.size())) != (ssize_t)value.size(): Input/output error"

Version-Release number of selected component (if applicable):
usbguard 0.7.8-1

How reproducible:
On Fedora 32 (fully updated) and usbguard running, plugging in the HarkRF one sdr device causes the IPC error. As a result, the SDR can't be used.

Steps to Reproduce:
1. Plug in HackRF one 
2. usbguard allow-device #
3. "PC ERROR: request id=1: SysFSDevice: (rc = write(fd, &value[0], value.size())) != (ssize_t)value.size(): Input/output error"

Actual results:

PC ERROR: request id=1: SysFSDevice: (rc = write(fd, &value[0], value.size())) != (ssize_t)value.size(): Input/output error

Expected results:

It should be enabled and the device should be accessible by tools like gnuradio-companion.

Additional info:
I have been using the device on F31 without issue, and since the update to F32, I did not use it at all until earlier today. The same device works well in another F31 system.

Comment 1 Radovan Sroka 2020-07-27 08:25:55 UTC
What about SELinux? is it enabled?

Comment 2 Harish Pillay 2020-07-27 08:38:34 UTC
(In reply to Radovan Sroka from comment #1)
> What about SELinux? is it enabled?

yes it is. all my systems are enabled.

Comment 3 Harish Pillay 2020-08-02 16:24:10 UTC
Created attachment 1703207 [details]
screen recording of command failures

this is a screenrecording of the command ran in the terminal to get the HackRF One device allowed via usbguard, the failures and then success and subsequent failures. Fully updated Fedora 32 system.

Comment 4 Harish Pillay 2020-08-08 09:49:58 UTC
I've tested the same HackRF on another Fedora 32 system and it worked just fine. But on the one that I had issues with (which also had usbguard enabled), I turned off usbguard (systemctl stop usbguard) and then plugged in the HackRF device and ran the lsusb which rightfully found it. 

I then started gqrx to see if it works. It too failed to work and I have the screencast of me doing that attached. I ran strace -o gqrx.txt gqrx to capture the outputs. I'm appending tht gqrx.txt file as well.

Comment 5 Harish Pillay 2020-08-08 09:51:42 UTC
Created attachment 1710880 [details]
another screencast that shows running the gqrx from the commandline with the strace command and the related errors. I will attach the strace output as well.

Comment 6 Harish Pillay 2020-08-08 09:52:32 UTC
Created attachment 1710881 [details]
the strace capture of running gqrx on the commandline

Comment 7 Harish Pillay 2020-08-08 09:53:42 UTC
I think this is not related to usbguard at all and something else. Any hints as to what else I can check is welcome.

Comment 8 Harish Pillay 2020-08-25 13:33:51 UTC
I updated the firmware of the HackRF One and now it is not displaying the error. The same card before the firmware update, on another Fedora 32 system, works just fine. With the updated firmware, on the other F32, it still works OK. So, I am not sure what to make of the error. I will close this bug report.