Warden fixes#312
Open
Krilliac wants to merge 2 commits intomangoszero:masterfrom
Open
Conversation
Address issues from Warden research pass on the 1.12.1 (build 5875) path: - WardenWin::InitializeModule(): zero-initialize WardenInitModuleRequest and compute the three block checksums after all covered fields have been assigned. Also corrects CheckSumm2 starting offset (was pointing at Unk2 in block 1 instead of Unk3 in block 2). - WardenWin::RequestData(): validate that DB metadata is present before scheduling a check id, drop unknown ids with a clear log entry, and bail out cleanly when no checks are loaded for the client build. - WardenWin::HandleData(): reject responses received outside STATE_REQUESTED_DATA, validate Length against remaining buffer before scanning, bounds-check every memcmp/skip, abort cleanly on unknown check types, catch ByteBufferException on underflow, and log every failed check (not only the last one) while applying the strictest configured penalty. - WardenCheckMgr::GetWardenCheckIds(): partition checks so MEM_CHECK and MODULE_CHECK go through the memory queue and everything else goes through the other queue. Skip TIMING_CHECK rows because RequestData() always appends a synthetic TIMING_CHECK per cycle. - WardenCheckMgr::LoadWardenChecks(): probe for the optional `groupid` column and, if present, round-robin selection across groups so similar checks are not all consumed back-to-back. - WorldSession::HandleWardenDataOpcode(): centralize state validation via Warden::IsValidIncomingOpcode(), implement WARDEN_CMSG_MEM_CHECKS_RESULT (apply penalty), make WARDEN_CMSG_MODULE_FAILED actionable, and drain the packet on every error path. - mangosd.conf.dist.in: default Warden.ClientCheckFailAction to 0 (log-only) so it matches the code default. Document the recommendation to keep log-only until Warden has been validated against real clients.
Fix Warden integration: init checksums, scheduling, validation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is