Project

General

Profile

Bug #437

keymat_v2.c:derive_ike_keys may have mem leak

Added by yeping xing over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
charon
Target version:
Start date:
06.11.2013
Due date:
Estimated time:
Affected version:
5.1.1
Resolution:
Fixed

Description

Hi:

In the latest version,

derive_ike_keys :
....
line 271:
if (dh->get_shared_secret(dh, &secret) != SUCCESS) {
return FALSE;
}
....
line 358:
chunk_clear(&secret);

The secret were allocted by dh->get_shared_secret,and it was freed at line 358.
But,there may be some mistakes between line 271 and line 358,and it returned FALSE
without free the secret.

Associated revisions

Revision c49c3f32 (diff)
Added by Tobias Brunner over 6 years ago

ikev2: Properly free DH secret in case of errors during IKE key derivation

Fixes #437.

History

#1 Updated by Tobias Brunner over 6 years ago

  • Tracker changed from Issue to Bug
  • Description updated (diff)
  • Category set to charon
  • Status changed from New to Closed
  • Assignee set to Tobias Brunner
  • Target version set to 5.1.2
  • Resolution set to Fixed

Fixed with the associated commit. Thanks for the report.

Also available in: Atom PDF