View Issue Details

IDProjectCategoryView StatusLast Update
0009462Talermerchant backendpublic2025-01-16 17:57
Reporterfefe Assigned ToResolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynoneSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Versiongit (master) 
Target Versionpost-2.0 
Summary0009462: in-band signaling in the log
DescriptionLogging in the merchant backend is usually using function calls like this:

```
 874 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
 875 "KYC status for `%s' at `%s' is %u/%s/%s/%s\n",
 876 payto_uri.full_payto,
 877 exchange_url,
 878 last_http_status,
 879 kyc_ok ? "KYC OK" : "KYC NEEDED",
 880 in_aml_review ? "IN AML REVIEW" : "NO AML REVIEW",
 881 NULL == jlimits ? "DEFAULT LIMITS" : "CUSTOM LIMITS");
```

If any of these fields are attacker controlled, they can inject escape characters or newlines into the log files, corrupting them in the process. Are these logs just informational or are they looked at for evidence collection or security purposes afterwards? If so, they should make sure to preserve the data while not allowing it to corrupt the logs. For example, they could be urlencoded or quoted printable maybe.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2025-01-16 15:58

manager   ~0023989

We're not currently providing any assurances that the log doesn't contain newlines or other escape characters or is otherwise well-formed. The intention for now is to provide logs to help developers diagnose issues. The only "automatic" processing we do is filter by ERROR/WARNING (if these strings are anywhere on a line) to raise alerts from the monitoring that something isn't quite right. But there newlines also are no real problem, as the point is to call attention to devops people inspecting the logs. If we ever change what we do with the logs, this could be reviewed.

Issue History

Date ModifiedUsernameFieldChange
2025-01-16 15:54fefeNew Issue
2025-01-16 15:54fefeStatusnew => assigned
2025-01-16 15:54fefeAssigned To => Christian Grothoff
2025-01-16 15:58Christian GrothoffNote Added: 0023989
2025-01-16 15:59Christian GrothoffPrioritynormal => none
2025-01-16 15:59Christian GrothoffSeverityminor => feature
2025-01-16 15:59Christian GrothoffStatusassigned => acknowledged
2025-01-16 15:59Christian GrothoffProduct Version => git (master)
2025-01-16 15:59Christian GrothoffTarget Version => post-2.0
2025-01-16 17:57Christian GrothoffAssigned ToChristian Grothoff =>
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend