{"id":"CVE-2026-40943","aliases":["GHSA-5gqc-qhrj-9xw8","GO-2026-5145"],"url":"https://o3.security/vulnerability/CVE-2026-40943","summary":"Oxia: Server crash via race condition in session heartbeat handling","details":"### Summary\nA 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`).\n\n### Impact\nA 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.\n\nAll versions are affected.\n\n### Details\nIn `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.\n\nAdditionally, 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.\n\n### Patches\nFixed 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.\n\n### Workarounds\nNo workaround available.","published":"2026-04-21T21:13:31.675Z","modified":"2026-08-12T03:51:30.018596203Z","cvss":null,"epss":{"score":0.00202,"percentile":0.09977,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/oxia-db/oxia","fixedVersion":"0.16.2"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40943.json"},{"type":"ADVISORY","url":"https://github.com/oxia-db/oxia/security/advisories/GHSA-5gqc-qhrj-9xw8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40943"},{"type":"PACKAGE","url":"https://github.com/oxia-db/oxia"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:30.018596203Z"}}