Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version
What changed, and why it matters
This commit adds a test that exposes a bug in Core Lightning: if you try to re-enable a single-use offer that has already been used, the daemon hits an internal assertion and crashes. The test is marked as expected-to-fail for now, meaning the actual crash is not fixed by this commit—it only documents the failure. A user with RPC access could trigger a denial-of-service by calling enableoffer on a used single-use offer.
Recommended action
Treat this as a known bug needing a follow-up fix. The enableoffer path should reject or clear OFFER_STATUS_USED_F before setting OFFER_STATUS_ACTIVE_F, or explicitly forbid re-enabling used single-use offers and return the OFFER_USED_SINGLE_USE RPC error. Until fixed, restrict RPC access to trusted callers.
Security signals we found
01
Daemon abort/fatal assertion triggered through RPC
02
Denial-of-service via crafted enableoffer call
03
State-machine validation gap in offer status transitions
04
Test-only commit marking issue as expected failure
Technical analysis
Evidence from the diff
The commit modifies tests/test_pay.py to add a regression test for wallet_offer_enable / json_enableoffer. When enableoffer is invoked on a single-use offer whose status is OFFER_STATUS_SINGLE_F|OFFER_STATUS_USED_F, the code sets OFFER_STATUS_ACTIVE_F, producing the combined status value 7. offer_status_in_db treats that combination as invalid and calls fatal(), aborting the daemon. The test asserts the RPC should instead return error code 1007 (OFFER_USED_SINGLE_USE). It is annotated with @pytest.mark.xfail(strict=True), so the patch records the bug rather than resolving it.
This commit is a simple documentation revert. It undoes a previous change that told macOS users to install GNU make and GNU patch from Homebrew and to put those tools first in their command path. The reverted instructions now omit gpatch a…
This commit re-adds an old-style 'x' prefix to a string comparison in a test helper script. It is a test-only change with no effect on the actual Core Lightning node software, user funds, network behavior, or security. The change simply re…
This commit only updates macOS installation instructions in the documentation. It tells macOS users to install newer GNU versions of 'make' and 'patch' from Homebrew because Apple's built-in tools are too old for building and running sourc…