Member-only story

Mach IPC Security on macOS

Introduction to Mach IPC and System Services security

Karol Mazurek
18 min readDec 17, 2024

INTRO

It is one of the few articles on XNU internals. As the main article about XNU has become lengthy, I decided to publish the one about Mach Inter-Process Communication separately to not overwhelm readers (and myself).

Enjoy!

Mach

Tasks and threads (in BSD layer mapped as processes and threads). Communication between tasks occurs via Mach IPC.

Mach IPC has one-way communication channels.

Mach IPC

It enables tasks (processes) to exchange information through ports asynchronously. Main components:

  • Ports: Kernel-protected communication channel (like pipe)
  • Port Rights: Define permissions to interact with ports (handle)
  • Messages: Structured data packets exchanged between ports

--

--

No responses yet