0xC000001D (#UD) at patched insertq (SSE4a) sites in title image - Intel host, ~30s into gameplay #45

Open
opened 2026-12-05 05:12:09 +00:00 by github-bot · 0 comments
Owner

@⁠Tip-Tutaki on GitHub · 2026-12-05 05:07 UTC · original

Summary

Three 0xC000001D (#UD, illegal instruction) crashes inside the mapped title image today, ~30 s into gameplay each time, on an Intel host. Disassembly of the two fatal sites shows both are the same inlined helper built around insertq (AMD SSE4a) — and the crash records show the loader's static patch was present at both sites when the process died (e9 … 90 jmp+nop planted over the 6-byte insertq). Many sibling insertq sites in the same run were emulated successfully at runtime (first-chance, caught). Suspected cross-modifying-code race on multi-threaded execution of these helpers; details and evidence below.

Environment

  • Host CPU: Intel i7-13700K (no SSE4a — hence #UD on unpatched sites)
  • GPU: RTX 5070 Ti, driver 620.73.0
  • victory.exe: x86_64-pc-windows-msvc release, built 2026-12-03 (VIctory-Hydra @ 9dca5652)
  • Under Proton (GE-Proton11-14-viewtree / umu), but the fault is in the title image itself
  • Title: 930.048.020-vb_sub_story, TitleID 7952987A, image victory-image-b99f876b74d4a77f.dll (cache dir native-2560x1440-upscaler-balanced-sdr)
  • Console: series-x, DLSS balanced, FG 6x (crashes also occurred before any MFG Unlocker was in play — see below)

Crash records (from crashes.log)

unix time 1796442231, process 280
VIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x5084782 (code e9 b9 ba 3f fa 90 c4 e2 79 21 c0 c5 f8 5b c0)
unix time 1796442433, process 276
VIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x5084782 (code e9 b9 ba 3f fa 90 c4 e2 79 21 c0 c5 f8 5b c0)
unix time 1796445488, process 280
VIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x55b1811 (code e9 4a eb ec f9 90 c4 e2 79 21 c9 c5 f8 5b c9)

The fatal sites are insertq (SSE4a), and they WERE patched

On-disk cache image (unpatched at these RVAs), objdump:

## site A: RVA +0x5084782
145084782: f2 0f 78 c0 08 18   insertq $0x18,$0x8,%xmm0,%xmm0   <-- AMD-only SSE4a
145084788: c4 e2 79 21 c0      vpmovsxbd %xmm0,%xmm0
14508478d: c5 f8 5b c0         vcvtdq2ps %xmm0,%xmm0

## site B: RVA +0x55b1811
1455b1811: f2 0f 78 c9 08 18   insertq $0x18,$0x8,%xmm1,%xmm1
1455b1817: c4 e2 79 21 c9      vpmovsxbd %xmm1,%xmm1
1455b181c: c5 f8 5b c9         vcvtdq2ps %xmm1,%xmm1

Same inlined helper both times: int8 → sign-extend via insertq field insert → vpmovsxbd → vcvtdq2ps → square/blend/haddps×2 → vrsqrtps.

Live bytes at crash time (crash reporter's dump): e9 b9 ba 3f fa 90 / e9 4a eb ec f9 90 — a jmp rel32 + nop over the 6-byte insertq, with the original stream (vpmovsxbd …) continuing after. So the patch was applied; the thread died at the patched address anyway.

Where the planted jmp points

rel32 from the crash records (preferred ImageBase 0x140000000):

  • site A: target 0x13F480241 — 0x120 below ImageBase
  • site B: target 0x13F480361 — also just below ImageBase, 0x120 from site A's target

Both targets sit just under the image, 0x120 apart — consistent with a deliberate thunk region placed before the image rather than a wild jump. At this run's actual base (0x6fffe6b40000) they resolve to actual_base − 0xb7fdbf / − 0xb7fc9f.

The mechanism mostly works — sibling sites were emulated fine

The MFG Unlocker mod's log (it was loaded in the 17:37 run and observes first-chance exceptions) shows the same run surviving many other #UDs in the same image, caught and emulated at runtime:

+0x4E8AA70 / +0x4E8AA90 / +0x4E8AAB0 / +0x4E8AAD0 / +0x4E8AAF0   (thread 700, 17:37:39, five 0x20-strided sites, one call chain)
+0x4FB0BD7 / +0x4FB0C00                                          (thread 700, 17:37:40)
+0x2E7FF1                                                        (thread 496, 17:37:46)

Reading / hypothesis

  1. Static patching of insertq sites exists and landed at the two fatal sites (jmp+nop present at death).
  2. Runtime emulation also exists and handled at least 8 other sites this run.
  3. The two fatal sites died with #UD at the patched address itself while the final bytes there are a valid jmp. Best fit: these helpers execute on several title threads at once (thread 700, then 496, in one 7-second window); if the patch/emulation path touches code while a sibling thread executes in the same region, cross-modifying-code rules can transiently serve mixed bytes → #UD at that address — and the handler then classifies the site as already-patched (non-console bytes) and lets it through.
  4. Timing-dependent, which fits the data: 3 crashes across today's runs, two different sites, always ~30 s into gameplay (frame ~4600, world streamed in, helpers hot on multiple threads).

The 16:43 and 16:47 crashes happened with no MFG Unlocker loaded (first loaded 17:37), so the mod is only the witness in the third run, not a factor in the first two.

What would help

  • Whether the thunk target region (just below ImageBase) is expected, and whether the two fatal sites were in the static Site list or patched by the runtime scan.
  • Whether the runtime emulation path takes the modified code into account when a sibling thread is mid-execution in the same page/region (or whether sites are patched lazily on first fault — if so, the first-fault patch may race a sibling entering the same helper).
  • Happy to test a build with these two sites pre-patched statically, or with the emulation handler forced to re-decode at #UD time.

Attachments

Full evidence (crash logs ×3, crashes.log tail, the mod's observation log + status JSON, play-log excerpt, disassembly notes):
https://gist.github.com/Tip-Tutaki/6c5f1e7433b6ca9bd40bd96f5264eed5 Nothing from the game is included beyond what victory's own crash reporter prints.

**@⁠Tip-Tutaki** on GitHub · 2026-12-05 05:07 UTC · [original](https://github.com/ToLIManl/VIctory-Hydra/issues/45) ## Summary Three `0xC000001D` (#UD, illegal instruction) crashes inside the mapped title image today, ~30 s into gameplay each time, on an **Intel** host. Disassembly of the two fatal sites shows both are the same inlined helper built around **`insertq` (AMD SSE4a)** — and the crash records show the loader's static patch **was present** at both sites when the process died (`e9 … 90` jmp+nop planted over the 6-byte `insertq`). Many sibling `insertq` sites in the same run were emulated successfully at runtime (first-chance, caught). Suspected cross-modifying-code race on multi-threaded execution of these helpers; details and evidence below. ## Environment - Host CPU: Intel i7-13700K (no SSE4a — hence #UD on unpatched sites) - GPU: RTX 5070 Ti, driver 620.73.0 - victory.exe: x86_64-pc-windows-msvc release, built 2026-12-03 (VIctory-Hydra @ 9dca5652) - Under Proton (GE-Proton11-14-viewtree / umu), but the fault is in the title image itself - Title: 930.048.020-vb_sub_story, TitleID 7952987A, image `victory-image-b99f876b74d4a77f.dll` (cache dir `native-2560x1440-upscaler-balanced-sdr`) - Console: series-x, DLSS balanced, FG 6x (crashes also occurred before any MFG Unlocker was in play — see below) ## Crash records (from `crashes.log`) ``` unix time 1796442231, process 280 VIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x5084782 (code e9 b9 ba 3f fa 90 c4 e2 79 21 c0 c5 f8 5b c0) unix time 1796442433, process 276 VIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x5084782 (code e9 b9 ba 3f fa 90 c4 e2 79 21 c0 c5 f8 5b c0) unix time 1796445488, process 280 VIctory: unhandled exception 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x55b1811 (code e9 4a eb ec f9 90 c4 e2 79 21 c9 c5 f8 5b c9) ``` ## The fatal sites are `insertq` (SSE4a), and they WERE patched On-disk cache image (unpatched at these RVAs), objdump: ``` ## site A: RVA +0x5084782 145084782: f2 0f 78 c0 08 18 insertq $0x18,$0x8,%xmm0,%xmm0 <-- AMD-only SSE4a 145084788: c4 e2 79 21 c0 vpmovsxbd %xmm0,%xmm0 14508478d: c5 f8 5b c0 vcvtdq2ps %xmm0,%xmm0 ## site B: RVA +0x55b1811 1455b1811: f2 0f 78 c9 08 18 insertq $0x18,$0x8,%xmm1,%xmm1 1455b1817: c4 e2 79 21 c9 vpmovsxbd %xmm1,%xmm1 1455b181c: c5 f8 5b c9 vcvtdq2ps %xmm1,%xmm1 ``` Same inlined helper both times: int8 → sign-extend via insertq field insert → `vpmovsxbd` → `vcvtdq2ps` → square/blend/`haddps`×2 → `vrsqrtps`. Live bytes at crash time (crash reporter's dump): `e9 b9 ba 3f fa 90` / `e9 4a eb ec f9 90` — a **jmp rel32 + nop** over the 6-byte `insertq`, with the original stream (`vpmovsxbd …`) continuing after. So the patch was applied; the thread died at the patched address anyway. ## Where the planted jmp points rel32 from the crash records (preferred ImageBase 0x140000000): - site A: target `0x13F480241` — 0x120 **below** ImageBase - site B: target `0x13F480361` — also just below ImageBase, 0x120 from site A's target Both targets sit just under the image, 0x120 apart — consistent with a deliberate thunk region placed before the image rather than a wild jump. At this run's actual base (0x6fffe6b40000) they resolve to `actual_base − 0xb7fdbf` / `− 0xb7fc9f`. ## The mechanism mostly works — sibling sites were emulated fine The MFG Unlocker mod's log (it was loaded in the 17:37 run and observes first-chance exceptions) shows the same run **surviving** many other #UDs in the same image, caught and emulated at runtime: ``` +0x4E8AA70 / +0x4E8AA90 / +0x4E8AAB0 / +0x4E8AAD0 / +0x4E8AAF0 (thread 700, 17:37:39, five 0x20-strided sites, one call chain) +0x4FB0BD7 / +0x4FB0C00 (thread 700, 17:37:40) +0x2E7FF1 (thread 496, 17:37:46) ``` ## Reading / hypothesis 1. Static patching of insertq sites exists and landed at the two fatal sites (jmp+nop present at death). 2. Runtime emulation also exists and handled at least 8 other sites this run. 3. The two fatal sites died with #UD **at the patched address itself** while the final bytes there are a valid jmp. Best fit: these helpers execute on several title threads at once (thread 700, then 496, in one 7-second window); if the patch/emulation path touches code while a sibling thread executes in the same region, cross-modifying-code rules can transiently serve mixed bytes → #UD at that address — and the handler then classifies the site as already-patched (non-console bytes) and lets it through. 4. Timing-dependent, which fits the data: 3 crashes across today's runs, two different sites, always ~30 s into gameplay (frame ~4600, world streamed in, helpers hot on multiple threads). The 16:43 and 16:47 crashes happened with **no MFG Unlocker loaded** (first loaded 17:37), so the mod is only the witness in the third run, not a factor in the first two. ## What would help - Whether the thunk target region (just below ImageBase) is expected, and whether the two fatal sites were in the static `Site` list or patched by the runtime scan. - Whether the runtime emulation path takes the modified code into account when a sibling thread is mid-execution in the same page/region (or whether sites are patched lazily on first fault — if so, the first-fault patch may race a sibling entering the same helper). - Happy to test a build with these two sites pre-patched statically, or with the emulation handler forced to re-decode at #UD time. ## Attachments Full evidence (crash logs ×3, crashes.log tail, the mod's observation log + status JSON, play-log excerpt, disassembly notes): https://gist.github.com/Tip-Tutaki/6c5f1e7433b6ca9bd40bd96f5264eed5 Nothing from the game is included beyond what victory's own crash reporter prints.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 05:12:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.