Fails to capture IOUSBHostInterface with macOS 15.3 despite root privileges in app

I have an app that captures USB storage device and sends some commands to it. The app has a privilege helper tool which captures the USB device. Everything was working fine upto macOS 15.2 but it 15.3 update broke the functionality.

When the helper tool tries to capture the USB device, it is able to capture IOUSBHostDevice but fails to capture IOUSBHostInterface. The error is

Code: 3758097097; Domain: IOUSBHostErrorDomain; Description: Failed to create IOUSBHostInterface.; Reason: Failed [super init]

I have verified the UID, EUID, GID, EGID = 0 for the helper process. So by IOUSBHost documentation it should have worked. The code that cause the error inside the helper tool is

func captureUSBInterface(interface: io_service_t) -> IOUSBHostInterface? {
    let queue = DispatchQueue(label: "com.example.usbdevice.queue2")
    var capturedInterface: IOUSBHostInterface?
    do {
        capturedInterface = try IOUSBHostInterface(__ioService: interface, options: .deviceCapture, queue: queue, interestHandler: nil)
    } catch {
        NSLog("Failed to capture USB interface: \(error)")
        return nil
    }
    return capturedInterface
}

The app has sandbox=False and is distributed outside of the App Store.

Please advise (long-term, short-term solutions) on how to make this work.

Would it help if we share some logs? If yes, can you recommend any specific command we should run to fetch the logs?

Please file a bug on this and, as part of that bug, include the following:

  • Note the details of the hardware you're working with.

  • Collect an IORegistryExplorer.app snapshot and upload it to the bug.

  • Reproduce the issue you're seeing multiple times, noting exactly what times you'd triggered the issue in each test.

  • Collect a sysdiagnose and upload it to the bug.

...then post the bug number back here. Once the bug is filed and the data uploaded, I can pull the data from there and see what I can determine.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Thanks for the reply Kevin. I have filed a bug FB16524420 with necessary reports.

I have discovered yesterday that if I turn off the SIP, the problem goes away. Hope that helps.

Fails to capture IOUSBHostInterface with macOS 15.3 despite root privileges in app
 
 
Q