Dave Burbank - 2 days ago

I have VeraCrypt 1.26.29 installed on an M1 MAX MacBook Pro and an M5 MAX MacBook Pro. Attempts to open encrypted volumes on the M1 MAX MacBook Pro result in a VeraCrypt crash. I've spent a lot of time on this and with the help of Gemini, a description of the issue is pasted below. Should I send this to someone else?

Bug Report: macOS Fork-Safety Crash (SIGABRT in performForkChildInitialize) During Volume Mount

Environment:

  • VeraCrypt Version: 1.26.29 (Native ARM-64)
  • macFUSE Version: 5.4.0 (/usr/local/lib/libfuse.2.dylib / MFMount.framework 2.3)
  • OS: macOS 27.0.1 (Build 26A434)
  • Hardware: Apple Silicon (MacBookPro18,2 / M1 Max)

Summary:
Mounting a volume crashes VeraCrypt immediately with SIGABRT (Namespace OBJC, Code 1) due to macOS's fork-safety runtime enforcement.

Root Cause Analysis:
During the mount sequence, a background worker thread spawned by libfuse.2.dylib calls DASessionCreate (DiskArbitration.framework) to register the newly mounted volume with macOS.

Because DiskArbitration has not yet been initialized in the process, DASessionCreate triggers internal one-time initialization (pthread_once $\rightarrow$ __DAInitialize), which calls into CoreFoundation/Objective-C (-[__NSDictionaryM __setObject:forKey:]).

Since VeraCrypt spawns worker threads around a fork() boundary without an immediate exec(), the Objective-C runtime flags an uninitialized class initialization on the child side of the fork (performForkChildInitialize $\rightarrow$ initializeNonMetaClass) and aborts the process:

Application Specific Information:
crashed on child side of fork pre-exec

Thread 1 Crashed:
0  libsystem_kernel.dylib     __abort_with_payload
...
5  libobjc.A.dylib            performForkChildInitialize
6  libobjc.A.dylib            initializeNonMetaClass
11 CoreFoundation             -[__NSDictionaryM __setObject:forKey:]
12 DiskArbitration            __DAInitialize
16 libsystem_pthread.dylib    pthread_once
17 DiskArbitration            DASessionCreate
18 libfuse.2.dylib            0x104fbd8e4
19 libfuse.2.dylib            0x104fc2040
20 libsystem_pthread.dylib    _pthread_start

Workaround Verified:
Passing OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES into the environment resolves the crash and allows the volume to mount successfully.

Suggested Fix:

  • Pre-warm / initialize DiskArbitration (e.g., a dummy DASessionCreate or framework touch) on the main thread during initial application launch, prior to creating background worker threads or calling fork().
  • Alternatively, embed LSEnvironment with OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES inside the application bundle's Info.plist for macOS targets until background multi-threading around fork calls can be refactored.
 

Last edit: Dave Burbank 2 days ago