fix: harden vintage x86 reward validation (bounty #16271) - #8331
Open
rafaio1 wants to merge 1 commit into
Open
Conversation
- Expand _classify_validated_x86_brand regex to cover missing 386/486 variants (i386sx/dx, am386sx/dx, i486sx/dx/dx2/dx4, am486dx/dx2/dx4, ti486sx/dx/dx2/dx4, cyrix cx486s/dx/dx2/dx4, am5x86-wt/dx4) - Add allowlist guard in _derive_enroll_weight_device: non-vintage claimed arch now clamps to default instead of passing through unchanged - Final tail guard ensures observed_arch is in _X86_VINTAGE_REWARD_ARCHES - Add 12 adversarial regression tests covering spoofed modern CPUs, honest vintage variants, brand boundary conditions, arbitrary arch injection, and Pentium M speed edge cases All 55 tests pass. References Scottcjn#8106 for complementary ARM/console work.
Contributor
Author
|
This PR addresses bounty #16271 (Harden x86 vintage-arch reward validation). All CI checks passing. Claim active until 2026-09-10. Wallet: RTC1e9bf7a2a60aac9bcbc5a0df0c65e9501e932861. Ready for review. |
Contributor
Author
|
Friendly ping for review. This PR addresses the vintage x86 anti-spoof validation hardening for bounty #16271. Claim is active until 2026-09-10. All checks passing. Ready for maintainer feedback. |
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.
Summary
Hardens the vintage x86 reward enrollment path against spoofed arch claims and incomplete brand coverage, as specified in bounty #16271.
Changes
_classify_validated_x86_brand(): Expanded anchored regex patterns to cover missing 386/486 variants that were incorrectly rejected after PR fix: harden x86 vintage-arch reward validation (anti-spoof) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] #8087:i386sx,i386dx,am386sx,am386dxi486sx,i486dx,i486dx2,i486dx4,am486dx,am486dx2,am486dx4,ti486sx,ti486dx,ti486dx2,ti486dx4,cyrix cx486s,cyrix cx486dx,cyrix cx486dx2,cyrix cx486dx4,am5x86-wt,am5x86-dx4_derive_enroll_weight_device(): Split the early guard so non-x86 families pass through unchanged but non-vintage claimed arches now clamp todefaultinstead of returning the unmodified device dict. Added a final tail guard ensuringobserved_archis in_X86_VINTAGE_REWARD_ARCHESbefore returning a tier.Tests: Added 12 adversarial regression tests covering spoofed modern CPUs claiming vintage, honest vintage variant acceptance, brand boundary conditions (Pentium ≠ Pentium Pro), arbitrary arch string injection via oracle, and Pentium M speed edge cases (1700 MHz boundary, missing speed).
All 55 tests pass.
Scope
x86-only. ARM/console allowlist work is tracked separately in #8106.
Closes #16271.