Skip to content

[Bug]: VirtualBoxVM crashes on macOS host with SIGABRT in VBoxSharedClipboard.dylib (NSInvalidArgumentException: index beyond bounds) #775

Description

@0xfff0800

Version

7.2.12

Host OS Type

macOS

Host OS name + version

macOS 26.5.2 (Build 25F84)

Host Architecture

ARM

Guest OS Type

macOS

Guest Architecture

ARM

Guest OS name + version

Linux

Component

Other

What happened?

VirtualBoxVM crashed with EXC_CRASH (SIGABRT) while the VM was running. The crash occurred on the "SHCLIP" thread (VBoxSharedClipboard) with the following exception:

-[__NSCFArray objectAtIndex:]: index (3) beyond bounds (0)

This is an NSInvalidArgumentException triggered when VBoxSharedClipboard.dylib called PasteboardGetItemIdentifier (via macOS's HIServices/IndexToItem), attempting to access index 3 of an empty pasteboard item array (0 elements). This looks like a race condition where the shared clipboard code queries the number of pasteboard items and then tries to read an item that no longer exists (e.g. because the host clipboard content changed between the count check and the read).

Expected behavior: the shared clipboard sync should not crash the whole VM process when the host pasteboard is empty or changes concurrently.

Crash reporter key: 1150018F-D6B8-214F-D140-FD94DC17D616
Incident Identifier: 445F1222-AC4D-4D57-BDFC-95B298B2E59A

VirtualBoxVM.rtf

How can we reproduce this?

  1. Start a VM on a macOS (Apple Silicon) host with VirtualBox 7.2.12.
  2. Enable Shared Clipboard (Devices > Shared Clipboard, or in VM settings).
  3. Use the host clipboard normally while the VM is running (copy/cut content on the host, possibly in quick succession or while an application is updating the pasteboard).
  4. VirtualBoxVM crashes unexpectedly with SIGABRT during clipboard synchronization.

Note: exact reproduction steps for the specific clipboard state that triggers the empty-pasteboard read were not captured; the crash log indicates it happens during a PasteboardGetItemIdentifier call from the SHCLIP thread.

Did you upload all of your necessary log files, screenshots, etc.?

  • Yes, I've uploaded all pertinent files to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions