[Parity][net-world][S2][R] 0x0C 被解成 u16 mode,产生 531 这类不存在的 MonMode,而且客户端不做范围校验 #570

Closed
opened 2026-10-02 11:42:40 +00:00 by troytt · 0 comments
Owner

1.13c 客户端保真度审计立项(基准快照:7bd1090 / main @ 77a20c7)

证据标记说明:V-data = 1.13c MPQ 数据表 (.txt / animdata.d2 / .tbl / pal.pl2);V-src = D2MOO 逆向源码;V-bin = 1.13c DLL 反汇编;K = 1.13c 公认行为。

来源审计项:net-world#10 — [S2][R] F10 0x0C 被解成 u16 mode,产生 531 这类不存在的 MonMode,而且客户端不做范围校验

  • 位置:src/netproto/d2gs/s2c/units.ts:52-67;src/client/world/client-world.ts:1914-1962(UnitMode 收到任何 mode 都接受,并清掉 castState)
  • 原版:SCmd.cpp:190-202:结构为 [hdr][type][guid][unk0x06][hitClass][life];唯一调用点 MonsterMsg.cpp:94,用于更新生命和 hitClass,life 字节带 −1 修正和 0x80 标志(V-src)。
  • 实测:unk=19、hitClass=2 → mode = 19 | 2<<8 = 531。
  • 影响:怪物进入无效 mode(渲染找不到 COF),正在播的攻击或施法被打断;lifePct 也按错误语义写入。
  • 建议:0x0C 只更新 life/hitClass;UnitMode 对 MonMode 0..15、PlrMode 0..19 做范围校验,越界直接报错(fail-fast)。
  • 已有 issue:—
> **1.13c 客户端保真度审计立项**(基准快照:`7bd1090` / `main @ 77a20c7`) > 证据标记说明:`V-data` = 1.13c MPQ 数据表 (`.txt` / `animdata.d2` / `.tbl` / `pal.pl2`);`V-src` = D2MOO 逆向源码;`V-bin` = 1.13c DLL 反汇编;`K` = 1.13c 公认行为。 ### 来源审计项:`net-world#10` — [S2][R] F10 0x0C 被解成 u16 mode,产生 531 这类不存在的 MonMode,而且客户端不做范围校验 - 位置:`src/netproto/d2gs/s2c/units.ts:52-67`;`src/client/world/client-world.ts:1914-1962`(`UnitMode` 收到任何 mode 都接受,并清掉 castState) - 原版:`SCmd.cpp:190-202`:结构为 [hdr][type][guid][unk0x06][hitClass][life];唯一调用点 `MonsterMsg.cpp:94`,用于更新生命和 hitClass,life 字节带 −1 修正和 0x80 标志(V-src)。 - 实测:unk=19、hitClass=2 → `mode = 19 | 2<<8 = 531`。 - 影响:怪物进入无效 mode(渲染找不到 COF),正在播的攻击或施法被打断;lifePct 也按错误语义写入。 - 建议:0x0C 只更新 life/hitClass;`UnitMode` 对 MonMode 0..15、PlrMode 0..19 做范围校验,越界直接报错(fail-fast)。 - 已有 issue:—
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#570
No description provided.