Skip to content

Segfault on 16bpp connections in KasmVNC 1.4.0 (GetAPIMessager::mainUpdateScreen) #355

@jahknem

Description

@jahknem

Describe the bug
With KasmVNC 1.4.0 installed, setting desktop.pixel_depth: 16 causes Xvnc to crash with SIGSEGV after a web client connects and authenticates. The same setup works with pixel_depth: 24.

Fresh reproduction on 1.4.0 shows crash in GetAPIMessager::mainUpdateScreen immediately after auth success.

System Description
Provide the output of

cat /etc/os-release
uname -a

cat /etc/os-release output:

PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.3
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

uname -a output:

Linux bastion-deb13-poc 6.12.73+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.73-1 (2026-02-17) x86_64 GNU/Linux

KasmVNC Details
Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.

Provide the output of this command.

Xvnc -version

Output:

Xvnc KasmVNC 1.4.0.663b6d6a0bdd4638bff981c75a522056aaaa1c2e - built Sep 22 2025 15:00:56
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12101007

To Reproduce
Steps to reproduce the behavior (for non-installation issues):
0. Have a Debian 13 installation with KDE as Desktop environment

  1. Install 1.4.0 package (kasmvncserver_trixie_1.4.0_amd64.deb).
  2. Configure ~/.vnc/kasmvnc.yaml with desktop.pixel_depth: 16 and websocket on 8443.
  3. Start a session: kasmvncserver :2
  4. Open the built-in web client at https://<redacted>:8443 and connect/authenticate.
  5. Observe Xvnc server crash.
  6. Check ~/.vnc/bastion-deb13-poc:2.log.

Repro config used:

network:
  websocket_port: 8443
  protocol: http
  udp:
    public_ip: <redacted>
  ssl:
    pem_certificate: ${HOME}/.vnc/self.pem
    pem_key: ${HOME}/.vnc/self.pem
desktop:
  allow_resize: false
  resolution:
    width: 1920
    height: 1080
  pixel_depth: 16
  gpu:
    hw3d: false
encoding:
  full_frame_updates: 5
runtime_configuration:
  allow_client_to_override_kasm_server_settings: true

Expected behavior
A clear and concise description of what you expected to happen.

Fresh crash evidence from ~/.vnc/bastion-deb13-poc:3.log:

2: Xvnc KasmVNC 1.4.0.663b6d6a0bdd4638bff981c75a522056aaaa1c2e
101: websocket 0: got client connection from <redacted>
103: websocket 1: got client connection from <redacted>
105: Connections: accepted: administrator@<redacted>_1773406115.558404::websocket
107: SConnection: Client requests security type VncAuth(2)
109: VNCSConnST: User administrator connected at 1773406115
111: (EE) Backtrace:
118: (EE) 3: /usr/bin/Xvnc (...GetAPIMessager::mainUpdateScreen...)
135: (EE) Segmentation fault at address 0x55f7650ed000
137: Fatal server error:
138: (EE) Caught signal 11 (Segmentation fault). Server aborting

Browser
If this is a problem with the KasmVNC client, provide details about the browser you are accessing KasmVNC from.

  • Device: MacBook Pro M4
  • OS: 26.3.1 (25D2128)
  • Browser: Microsoft Edge
  • Version: 145.0.3800.97 (Official Build) (arm64)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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