Questions tagged [kernel-extension]

Questions related to the development of macOS/Darwin kernel extensions, including both the generic (C) and I/O Kit (C++) kinds.

Extensions to the macOS/Darwin "xnu" kernel are packaged in the form of loadable modules. These are commonly referred to as "kexts", after the folder extension.

Two types of kernel extensions exist:

  • Extensions written in C, primarily against the BSD and Mach APIs. This format is typically used for networking-related extensions and file systems.
  • Extensions written in C++ against the I/O Kit API. This format is most common for device drivers and extensions that directly communicate with device drivers.

Not to be confused with DriverKit drivers and "System Extensions", neither of which run in a kernel context.

393 questions
22
votes
6 answers

What is /Library/StagedExtensions for and how to remove extensions

I'm trying to uninstall Parallels completely from macOS High Sierra. I removed everything from the disk except some Parallels extensions that are stored under /Library/StagedExtensions/Parallel Desktop.app I think the location has to do with user…
Pinco Pallino
  • 916
  • 1
  • 6
  • 18
22
votes
3 answers

Reading and writing to USB (HID) interrupt endpoints on Mac

I am attempting to communicate with a rather specific USB device and developing both Windows and Mac code to do so. The device is a USB device with a HID interface (class 3) with two endpoints, an interrupt input and an interrupt output. The…
Demi
  • 6,147
  • 7
  • 36
  • 38
14
votes
2 answers

MacOS High Sierra KEXT Loading - Are there any ways to cancel user approval?

As some kinds of MacOS developers know, Apple implemented Secure Kernel Extension Loading . Users can approve third party KEXT by clicking Approve button in Security and Privacy. However, once the KEXT is approved, are there any methods for…
HirofumiTamori
  • 1,125
  • 2
  • 13
  • 27
12
votes
1 answer

Writing an OS X kernel extension to implement Linux's SO_BINDTODEVICE socket option

I want to be able to force a socket through a specific network interface. In Linux the kernel allows a programmer to achieve this by setting said socket option - but in OS X I'm in the dark. And hence my title question - is it possible? Has it been…
Dor
  • 902
  • 4
  • 24
11
votes
2 answers

MacOSX: how to capture network events? Or: how does Private-Eye works?

I stumbled upon Private Eye and wonder how it works. I.e. what APIs it is using to get those information (all incoming/outcoming network connections and the application using it)? It is installing a kext. Is that needed?
Albert
  • 65,406
  • 61
  • 242
  • 386
11
votes
3 answers

macOS Kext with valid signature rejected after 2nd installation (high sierra)

In a machine where my product was installed before, a second installation fails, due to kext signature rejection. I have seen in some places the same error, for example here: https://support.eset.com/kb6570, however even after clearing the…
IdoT
  • 2,831
  • 1
  • 24
  • 35
11
votes
0 answers

Kext with invalid signature can load on one machine, but not the other. Why?

I have an iMac and a Macbook Pro. I updated both to Yosemite beta (the public one). But my audio interface Focusrite Saffire 24 DSP (Firewire) works properly in the iMac, but not on the Macbook Pro. When installing the Saffire, there is a…
10
votes
1 answer

Can't Unload Kernel Extension; Classes Have Instances

I'm writing an OSX kernel extension for an audio device driver (it's software, but emulates a hardware device). During development, it'd be convenient to completely uninstall existing old versions and then build and install the new version from…
pje
  • 21,801
  • 10
  • 54
  • 70
10
votes
3 answers

Best way to communicate from KEXT to Daemon and block until result is returned from Daemon

In KEXT, I am listening for file close via vnode or file scope listener. For certain (very few) files, I need to send file path to my system daemon which does some processing (this has to happen in daemon) and returns the result back to KEXT. The…
RHK
  • 131
  • 1
  • 4
9
votes
0 answers

How to write a virtual framebuffer driver for Mac?

So, I want to write a virtual monitor driver for mac. This is something similar to what screen recycler app does. I've been reading so many resources about driver programming and kext in general and I've done the basic iokit driver tutorial from…
Arvind
  • 730
  • 10
  • 20
9
votes
3 answers

codesigned kext But why not load in Yosemite(10.10)

I had a code signing on kext in Yosemite. But kextload is failed. It was version2 codesign. codesign --verify is true. But kextload is failed. Why not load in Yosemite? Here is my log. I have checked with codesign -dvvv ./myKext.kext And It's all…
나승훈
  • 99
  • 1
  • 1
  • 2
9
votes
1 answer

Codesigning Kext with kext enabled certificate fails during kextload, "code signature invalid"

So we have a certificate that allows us to sign kexts, but when we run > sudo kextload friendly.kext, it fails and we sign the kext we want, and to prove it's signed, here's some diagnostic output: codesign --verify -vvvv friendly.kext…
A O
  • 5,516
  • 3
  • 33
  • 68
8
votes
2 answers

MacOS Notarization on command line unable to create authentication session

Unable to validate your application. We are unable to create an authentication session MacOS notarization on command line returning 'unsupported url' when getting status xcrun altool --notarize-app --primary-bundle-id "com.xx" --username…
rootusb
  • 161
  • 1
  • 6
8
votes
0 answers

How to symbolicate a kernel panic report on OSX?

I want to know how can I symbolicate a kernel panic report (not a regular app crash report). I have an OSX app that a user claims caused a kernel panic. It doesn't install any kernel extension but a launch daemon. I have followed this link…
ZestyZest
  • 911
  • 13
  • 27
8
votes
2 answers

Unload kext which still has instances

I'm updating the driver of one of my devices and would like to kextunload the old driver and kextload the new one so a restart isn't required anymore. After the installation I try: sudo kextunload /System/Library/Extensions/Driver.kext The error…
Hedge
  • 16,142
  • 42
  • 141
  • 246
1
2 3
26 27