Skip to content

fix: Reject zero DomainID at preflight in OfferCreate and Payment#7356

Open
vlntb wants to merge 2 commits into
developfrom
vlntb/malformed-no-permission-fix
Open

fix: Reject zero DomainID at preflight in OfferCreate and Payment#7356
vlntb wants to merge 2 commits into
developfrom
vlntb/malformed-no-permission-fix

Conversation

@vlntb
Copy link
Copy Markdown
Contributor

@vlntb vlntb commented May 29, 2026

High Level Overview of Change

Context of Change

OfferCreate and Payment accepted transactions with sfDomainID present but set to all zeros. In Debug/ASan builds this triggered the Ledger::read : zero key assertion in permissioned_dex::accountInDomain. In Release builds the malformed transaction was misclassified as tecNO_PERMISSION, charging a fee, consuming a sequence, and writing the failed tx to he ledger.

The fix rejects zero sfDomainID at preflight with temMALFORMED, matching the existing convention for PermissionedDomainSet (which already rejects uint256(0) as malformed).

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.4%. Comparing base (2f3558c) to head (20766dc).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
.../libxrpl/ledger/helpers/PermissionedDEXHelpers.cpp 50.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7356     +/-   ##
=========================================
- Coverage     82.4%   82.4%   -0.0%     
=========================================
  Files         1011    1011             
  Lines        76477   76485      +8     
  Branches      7322    7315      -7     
=========================================
+ Hits         63005   63006      +1     
- Misses       13472   13479      +7     
Files with missing lines Coverage Δ
src/libxrpl/tx/transactors/dex/OfferCreate.cpp 93.4% <100.0%> (+<0.1%) ⬆️
src/libxrpl/tx/transactors/payment/Payment.cpp 93.8% <100.0%> (+0.1%) ⬆️
.../libxrpl/ledger/helpers/PermissionedDEXHelpers.cpp 93.5% <50.0%> (-3.0%) ⬇️

... and 4 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant