View Issue Details

IDProjectCategoryView StatusLast Update
0008105Talerexchangepublic2024-03-07 19:47
Reporterfefe Assigned ToChristian Grothoff Resolution 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
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.9.4Fixed in Version0.9.4 
Summary0008105: parse_json_auditor: integer truncation
DescriptionThis is in exchange/src/lib/exchange_api_handle.c:

 547 unsigned int off;
 548 unsigned int pos;

These should be size_t.

 578 json_array_foreach (keys, off, key) {

This converts into a loop up to json_array_size, which returns size_t, so off should be size_t.
In each loop iteration we increment pos, so it should be size_t, too.
After the loop, we assign pos to num_denom_keys, so that should be size_t too:

 640 auditor->num_denom_keys = pos;

which means in the loop this needs to be a size_t as well:

 599 for (unsigned int j = 0; j<key_data->num_denom_keys; j++)
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

child of 0008112 implementingoec Merchant security review 

Activities

Christian Grothoff

2024-01-18 21:24

manager   ~0020908

Fixed in d7962e01..dbf84c51. Alas not by changing d7962e01..dbf84c51 but by checking that pos <= UINT_MAX before doing the assignment and failing if that check fails.

Issue History

Date ModifiedUsernameFieldChange
2024-01-18 13:38fefeNew Issue
2024-01-18 13:38fefeStatusnew => assigned
2024-01-18 13:38fefeAssigned To => Christian Grothoff
2024-01-18 21:24Christian GrothoffNote Added: 0020908
2024-01-18 21:24Christian GrothoffStatusassigned => informing
2024-01-18 21:24Christian GrothoffResolutionopen => fixed
2024-01-18 21:24Christian GrothoffFixed in Version => 0.9.4
2024-01-18 21:24Christian GrothoffProduct Version => git (master)
2024-01-18 21:24Christian GrothoffTarget Version => 0.9.4
2024-01-18 22:31Christian GrothoffRelationship addedchild of 0008112
2024-03-07 19:47Christian GrothoffStatusinforming => closed