View Issue Details

IDProjectCategoryView StatusLast Update
0012274Talerexchangepublic2026-11-21 22:42
Reporterbot-oec [agent]  
Implementeroec  
PrioritylowSeverityminor 
Status implementing 
Target Version1.10 
Summary0012274: A close request to the origin account is stored with the origin as its target; the auditor reports a bad signature for every such close
DescriptionThe owner's signature over a close request covers the hash of the target account, or zeros when no target is given (the origin account). `post-reserves-RESERVE_PUB-close.c` replaces a missing target by the reserve's origin account before `insert_close_request`, so `close_requests.payto_uri` holds the origin account. The auditor (`taler-helper-auditor-reserves.c`, `handle_reserve_closed`) hashes the stored account and verifies the owner's signature against it; the signature covers zeros, so every close to the origin account is reported as a bad-signature loss of the whole closing amount. The auditor's branch for an empty target, and `COALESCE` in `iterate_unfinished_close_requests.c`, show that an empty target was meant to be stored.

**Steps to reproduce:**

1. A reserve of EUR:5.01.
2. A close request without target: 200.
3. The closer wires EUR:5 (EUR:0.01 fee).
4. Run the auditor: expected no report, gets one `bad-sig-losses` entry for the operation `close-request`.

The test `src/testing/test_auditor_api_close_origin.c` does this; it fails on master at step 4 (expects no report, gets one `bad-sig-losses` entry). The test will be on branch `dev/oec/formalization-findings` on git.taler.net; a note here will name the commit.

**Proposed fix:** store the target as the client gave it, empty for the origin account, as the closer (`COALESCE`) and the auditor (its branch for an empty target) expect; the column is `NOT NULL`, so this needs a schema change. Without one, the auditor can verify the signature over zeros when the stored target is the origin account; with that change in `handle_reserve_closed` the test passes, and the auditor's other close tests still do.

**Found by:** the formalization of the Taler protocols; the rule violated is (E3) in `spec/withdraw.md`: a close request is stored with its target as given (empty for the originating account) and its signature, which the auditor checks; an exchange that follows the protocol is never reported.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

bot-oec [agent]

2026-11-21 10:47

reporter   ~0030674

Test: branch `dev/oec/formalization-findings` of exchange.git (git.taler.net), commit 79b5c9f0b8f5 "testing: auditor on a close request to the origin account (0012274)", on master 7b658d8da.

test_auditor_api_close_origin_{cs,rsa}: a reserve is closed on request to its origin account; expected no auditor findings, gets one bad-sig-losses entry for the close request.

Fails on master at the auditor step.

Issue History

Date ModifiedUsernameFieldChange
2026-11-21 10:28bot-oecNew Issue
2026-11-21 10:28bot-oecImplementer => oec
2026-11-21 10:28bot-oecReviewer => Christian Grothoff
2026-11-21 10:28bot-oecRelease signed by => Christian Grothoff
2026-11-21 10:28bot-oecDeployed by => Christian Grothoff
2026-11-21 10:28bot-oecVerifier => oec
2026-11-21 10:28bot-oecCommunicator => CM_7
2026-11-21 10:47bot-oecNote Added: 0030674
2026-11-21 16:15oecImplementeroec =>
2026-11-21 22:39Christian GrothoffImplementer => oec
2026-11-21 22:39Christian GrothoffPrioritynormal => low
2026-11-21 22:39Christian GrothoffStatusnew => implementing
2026-11-21 22:39Christian GrothoffTarget Version => 1.10
2026-11-21 22:42Christian GrothoffView Statusprivate => public