View Issue Details

IDProjectCategoryView StatusLast Update
0008104Talerexchangepublic2024-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 
Target Version0.9.4Fixed in Version0.9.4 
Summary0008104: parse_json_denomkey_partially: memory leak?
DescriptionThis is in exchange/src/lib/exchange_api_handle.c:

 520 /* invalidate denom_key, just to be sure */
 521 memset (denom_key,
 522 0,
 523 sizeof (*denom_key));
 524 GNUNET_JSON_parse_free (spec);
 525 return GNUNET_SYSERR;
 526 }

denom_key contains an embedded pointer:

 460 struct TALER_EXCHANGE_DenomPublicKey *denom_key,

  71 struct TALER_EXCHANGE_DenomPublicKey
  72 {
  73 /**
  74 * The public key
  75 */
  76 struct TALER_DenominationPublicKey key;

1229 struct TALER_DenominationPublicKey
1230 {
1231
1232 /**
1233 * Age restriction mask used for the key.
1234 */
1235 struct TALER_AgeMask age_mask;
1236
1237 /**
1238 * Type of the public key.
1239 */
1240 struct GNUNET_CRYPTO_BlindSignPublicKey *bsign_pub_key;
1241
1242 };

If I read the code right, this public key came out of the json parser.
I think if you just memset the struct here, you leak the memory of the key.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

child of 0008112 implementingoec Merchant security review 

Activities

Christian Grothoff

2024-01-18 21:33

manager   ~0020912

Indeed, nice catch. Fixed in 53e679c9..c8126ffc

Issue History

Date ModifiedUsernameFieldChange
2024-01-18 13:33fefeNew Issue
2024-01-18 13:33fefeStatusnew => assigned
2024-01-18 13:33fefeAssigned To => Christian Grothoff
2024-01-18 21:33Christian GrothoffStatusassigned => informing
2024-01-18 21:33Christian GrothoffResolutionopen => fixed
2024-01-18 21:33Christian GrothoffFixed in Version => 0.9.4
2024-01-18 21:33Christian GrothoffNote Added: 0020912
2024-01-18 21:33Christian GrothoffTarget Version => 0.9.4
2024-01-18 22:30Christian GrothoffRelationship addedchild of 0008112
2024-03-07 19:47Christian GrothoffStatusinforming => closed