CVE-2026-40943: Oxia affected by server crash via race condition in session heartbeat handling
Summary A race condition between session heartbeat processing and session closure can cause the server to panic with send on closed channel. The heartbeat() method uses a blocking channel send while holding a mutex, and under specific timing with concurrent close() calls, this can lead to either a deadlock (channel buffer full) or a panic (send on closed channel after TOCTOU gap in KeepAlive).
Published Apr 14, 2026 · Updated Apr 24, 2026
Affected packages
github.com/oxia-db/oxia
- Ecosystem
- Go
- Affected
- <= 0.16.1
- Fixed in
- 0.16.2
- Check
go list -m github.com/oxia-db/oxia
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A race condition between session heartbeat processing and session closure can cause the server to panic with send on closed channel. The heartbeat() method uses a blocking channel send while holding a mutex, and under specific timing with concurrent close() calls, this can lead to either a deadlock (channel buffer full) or a panic (send on closed channel after TOCTOU gap in KeepAlive).
Impact
A remote client can trigger a server crash by sending rapid KeepAlive requests while a session is expiring or being closed. This is a denial-of-service vulnerability that crashes the entire data server process.
All versions are affected.
Details
In oxiad/dataserver/controller/lead/session.go, the heartbeat() method performs a blocking s.heartbeatCh <- true send. If the channel buffer is full (size 1), this blocks while holding the session mutex, preventing close() from acquiring the lock to close the channel — a deadlock.
Additionally, in session_manager.go, KeepAlive() releases the session manager's read lock before calling heartbeat(), creating a TOCTOU window where the session can be removed and closed between the lookup and the heartbeat call.
Patches
Fixed by changing heartbeat() to use a non-blocking select with a default case, and by holding the session manager read lock through the entire KeepAlive() operation.
Workarounds
No workaround available.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-40944
Oxia's TLS CA certificate chain validation fails with multi-certificate PEM bundles
high8.0Apr 14, 2026CVE-2026-40945
Oxia exposes bearer token in debug log messages on authentication failure
high8.7Apr 14, 2026CVE-2026-40946
Oxia has an OIDC token audience validation bypass via SkipClientIDCheck
critical9.3Apr 14, 2026
