[Windows] `kimi web` exits with 0xC0000409 (FAST_FAIL_STACK_COOKIE_CHECK_FAILURE) — bundled Node 24.15.0 carries the known libuv RtlGetVersion stack overflow
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
Lee .nvmrc y .github/workflows/_native-build.yml para confirmar qué versión de Node incluye la compilación nativa. Comprueba las correcciones de Node y libuv referenciadas en los proyectos upstream y, después, actualiza la versión del runtime para que los binarios de Windows incluyan la corrección. El trabajo estará terminado cuando la compilación nativa use una versión corregida de Node y el fallo de Windows notificado deje de reproducirse.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What version of Kimi Code is running?
2.5.2 (native Windows binary, FileVersion 24.15.0, i.e. the bundled Node runtime)
Note: this is not fixed on the current latest. .nvmrc is still 24.15.0 on main and on tag @moonshot-ai/[email protected], and .github/workflows/_native-build.yml builds the SEA with node-version-file: .nvmrc, so every shipped Windows binary carries the vulnerable runtime.
Which open platform/subscription were you using?
kimi-for-coding (managed:kimi-code). The crash is provider-independent — it also happens with a custom OpenAI-compatible provider, because it is in the TCP connect path, not in the model request path.
Which model were you using?
deepseek-v4.1-flash via a custom OpenAI-compatible provider (also reproduced with kimi-for-coding).
What platform is your computer?
Microsoft Windows NT 10.0.26300.0 x64 (Windows 11, build 26300)
What issue are you seeing?
kimi web on Windows dies silently after anywhere from a few minutes to a few hours of normal use:
- no JS error, no stack trace, no log line in
--log-level infooutput - no Windows Error Reporting entry (the process is killed by a fail-fast, so WER never runs)
- the only trace is the process exit code
exit code 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN)
ExceptionCode 0xC0000409
ExceptionInformation[0] = 0x2 (FAST_FAIL_STACK_COOKIE_CHECK_FAILURE)
Faulting address: kimi.exe+0x21F2189 (__report_gsfailure, int 0x29)
Observed crashes on one machine (2026-11-13), all started with kimi web --port 5090 --host --log-level info:
| started | died | exit code |
|---|---|---|
| 21:10:37 (official 2.5.2 binary, launched under procdump) | 21:50:34 | 0xC0000409 |
| 22:35:35 (2.5.2 from source, Node 24.15.0) | 23:31:44 | 0xC0000409 |
| 23:36:46 (same) | 23:44:22 | 0xC0000409 |
This has been happening consistently for weeks, on both the TUI and kimi web.
What steps can reproduce the bug?
In production it is probabilistic: just run the server and use it normally (the web UI, long sessions, tool calls). It correlates with number of outbound TCP connects, not with any particular request — every connect calls into the vulnerable code path.
The upstream libuv issue (libuv/libuv#5394) has a deterministic reproducer; it crashed 32/80 rounds on Node v24.15.0 on the reporter's machine. On my machine I could not make it fire in 70 runs of that same script — the trigger depends on what value happens to be left in one uninitialized stack slot, so the rate varies by machine/build — but the crash dumps prove the mechanism below.
// repro.mjs — from libuv/libuv#5394
import { createServer } from "node:http";
for (let i = 0; i < 84; i++) {
const server = createServer((req, res) => {
req.on("data", () => {});
req.on("end", () => {
res.writeHead(200, { "Content-Type": "application/json; charset=utf-8" });
res.end("{}");
});
});
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
const port = server.address().port;
const res = await fetch(`http://127.0.0.1:${port}/x`, {
signal: AbortSignal.timeout(30000),
});
await res.text();
await new Promise((resolve, reject) => server.close((e) => (e ? reject(e) : resolve())));
}
for ($r = 1; $r -le 80; $r++) {
node repro.mjs 2>&1 | Out-Null
if ($LASTEXITCODE -ne 0) { "round $r crashed: 0x{0:x8}" -f ($LASTEXITCODE -band 0xFFFFFFFFL) }
}
What is the expected behavior?
The server process stays up. If it must fail, it should log something actionable instead of vanishing.
Additional information
Full root cause, confirmed from a procdump -e -ma full-memory dump of the crash:
The crash is a stack-buffer overflow inside libuv, not in kimi code.
-
In
deps/uv/src/win/tcp.c,uv__is_fast_loopback_fail_supported()(renameduv__windows10_version1709()in libuv 1.52) does:OSVERSIONINFOW os_info; /* 276 bytes, dwOSVersionInfoSize NOT initialized */ if (!pRtlGetVersion) return 0; pRtlGetVersion(&os_info); -
ntdll!RtlGetVersionbranches on the (uninitialized)dwOSVersionInfoSize. If that field happens to equal0x11c(284,sizeof(RTL_OSVERSIONINFOEXW)), it takes the "EX" path and writes 284 bytes into the 276-byteOSVERSIONINFOW. -
In the clang-cl-built Node 24.15.0 frame for
uv__tcp_try_connect,os_infosits at[rsp+0xd4]and ends at exactly[rsp+0x1e8]— which is the compiler's/GScookie slot. The 8 extra bytes land on the cookie:[rsp+0x1e8] = 0x0001010000000000 ^^ ServicePackMajor = 0 ^^ ServicePackMinor = 0 ^^ SuiteMask = 0x0100 ^^ ProductType = 1 (VER_NT_WORKSTATION) -
The function returns through
__security_check_cookie, the check fails, and__report_gsfailurecalls__fastfail(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE)→0xC0000409. No handler can run; the process is gone. -
I reproduced step 2 in isolation (call
RtlGetVersionon a 276-byte buffer withdwOSVersionInfoSize = 0x11c): the 8 bytes after the buffer become00 00 00 00 00 01 01 xx, exactly the value found in the cookie slot in the dump. -
Symbolized stack from the dump (with the published
node.pdbfor v24.15.0):__report_gsfailure @ .../vcstartup/src/gs/gs_report.c:220 uv__tcp_try_connect @ deps/uv/src/win/tcp.c uv_tcp_connect @ deps/uv/src/uv-common.c:411 node::MakeLibuvRequestCallback<uv_connect_t,...> @ src/req_wrap-inl.h:126 node::TCPWrap::Connect @ src/tcp_wrap.cc:469 ... v8 FunctionCallback ... -
Fixed upstream in libuv by initializing the struct — libuv/libuv#5107 (
os_info.dwOSVersionInfoSize = sizeof(os_info); os_info.szCSDVersion[0] = L'\0';), cherry-picked into Node via nodejs/node#62561. It is present from Node v24.16.0 onward. I verifieddeps/uv/src/win/tcp.cper tag:Node libuv struct initialized kimi ships it v24.15.0 1.51.0 no yes (2.5.2 … 2.6.3) v24.20.0 / v24.21.0 / v24.22.0 1.52.1 yes no v26.13.1 1.52.1 yes no (Node v26.0.0 is also unfixed; the fix landed in 26.5.0. v22.x is latent-but-unobservable because its MSVC frame has a gap before the cookie.)
-
Because the vulnerable probe runs on every
uv_tcp_connect, the rate scales with how many connections the process makes — which is why long-runningkimi websessions with remote UI clients die and short ones usually do not.
Suggested fix: bump .nvmrc to a Node that carries the fix (v24.16.0+, e.g. the latest 24.x LTS line) so the native SEA build embeds a fixed libuv. package.json has engines.node >= 24.15.0, so this needs no other change.
User-side workaround until then: run from source with Node >= 24.16.0 (pnpm dev:server / node --import tsx ./src/main.ts web ...), which is unfixed at 24.15.0 and clean at 24.21.0.
Upstream references:
- libuv/libuv#5394 — deterministic reproducer + per-version crash rates (open)
- libuv/libuv#5107 — the fix (merged)
- nodejs/node#62561 — cherry-pick into Node (v24.16.0)
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.3k
- Forks
- 1.4k
- Merge medio
- 12 h 6 min
- PR fusionados (30 d)
- 596
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MoonshotAI/kimi-code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MoonshotAI/kimi-code#5539 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directoriesPosiblemente ocupada @markankamaransheogarat-sys la tomó hace 2 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
MoonshotAI/kimi-code#5296 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MoonshotAI/kimi-code#5256 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MoonshotAI/kimi-code#5062 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MoonshotAI/kimi-code#5025 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MoonshotAI/kimi-code
Issues similares
-
Add Alice&BotAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
bot:ai-assisted component:faucet github_actions security status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
midnightntwrk/midnight-faucet-api#215 ·
Los mantenedores suelen responder en 1 día
-
[功能] 手机端命令执行显示 AI 动作描述Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NanmiCoder/cc-haha#2034 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
mobile prio:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
digitalfabrik/entitlementcard#3324 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día