d3d12_guid_sites: filter IEEE-754 float4 SIMD constant false positives #525

Merged
kotekompotek merged 1 commit from upstream-pr/525 into main 2026-11-24 07:38:23 +00:00
kotekompotek commented 2026-11-24 06:55:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T06:55:57Z.


IEEE-754 float4 SIMD constants in .rdata (such as (1.5f, 1.0f, ...) or (0.1f, 1.0f, ...)) frequently have exponent/mantissa bits in bytes 7 and 8 that match RFC-4122 UUID version 3/4 and variant 10xx, polluting d3d12_guid_sites.py output with dozens of false-positive UNKNOWN GUIDs (62 out of 259 unknowns on a retail console .exe).

  • Add _looks_like_float4() to tools/d3d12_guid_sites.py and reject such constants in guid_shaped().
  • Add unit tests in tests/test_d3d12_guid_sites_float4.py verifying that float4 constants are rejected while real D3D12/GDK GUIDs remain accepted (9 passed via pytest).
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467586108 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/525). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T06:55:57Z. --- IEEE-754 `float4` SIMD constants in `.rdata` (such as `(1.5f, 1.0f, ...)` or `(0.1f, 1.0f, ...)`) frequently have exponent/mantissa bits in bytes 7 and 8 that match RFC-4122 UUID version 3/4 and variant `10xx`, polluting `d3d12_guid_sites.py` output with dozens of false-positive `UNKNOWN` GUIDs (62 out of 259 unknowns on a retail console `.exe`). - Add `_looks_like_float4()` to `tools/d3d12_guid_sites.py` and reject such constants in `guid_shaped()`. - Add unit tests in `tests/test_d3d12_guid_sites_float4.py` verifying that float4 constants are rejected while real D3D12/GDK GUIDs remain accepted (`9 passed` via `pytest`).
QemmHD commented 2026-11-24 07:38:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T07:38:21Z.


Merging. Why merged: float4 SIMD constants such as (1.5f, 1.0f, ...) were being reported as GUIDs; the new filter rejects them while every real D3D12/GDK GUID is still accepted.
Why it's good: security-reviewed; tested on Windows 11 on main d42773d: the new test fails on main (1 failed / 1 passed) and passes with this PR (2/2); the existing 10 guid_sites tests still pass.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7125208014 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/525#issuecomment-7125208014). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-24T07:38:21Z. --- Merging. Why merged: float4 SIMD constants such as (1.5f, 1.0f, ...) were being reported as GUIDs; the new filter rejects them while every real D3D12/GDK GUID is still accepted. Why it's good: security-reviewed; tested on Windows 11 on main d42773d: the new test fails on main (1 failed / 1 passed) and passes with this PR (2/2); the existing 10 guid_sites tests still pass. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!525
No description provided.