[Swan-commit] Changes to ref refs/heads/master

Andrew Cagney cagney at vault.libreswan.fi
Fri Apr 26 13:09:42 UTC 2019


New commits:
commit 430486a55b4cf7165716767f69db9f1dfa4f06d6
Merge: c2c2f72 29c6a7e
Author: Andrew Cagney <cagney at gnu.org>
Date:   Fri Apr 26 09:04:27 2019 -0400

    connections: really fix some add_connection() leaks
    
    Always allocate a connection and then populate it (using extract_connection()).
    When things fail, clean up the mess using discard_connection().
    
    Fixes leak of an IKE SA's proposal when the CHILD SA's proposal was
    invalid.
    
    Fixes leak of certificates because the unshare code was duping an
    already duped certificate.
    
    Because the .id and .ca values are always allocated, there's no longer
    a good reason for atodn() returning static data (the data is always
    and immediately cloned anyway).  Cleaning this up would sink another
    nail into temporary_cyclic_buffer()'s coffin.  Anyone?
    
    Because there's a both a connection to store results and a way to
    recover from errors, there's no longer any reason to process
    certifiates twice (once when pre-loading the private key before the
    connection is allocated, and once in extract end).  Soon.
    
    Merge commit '29c6a7e33472139a60c46bcef3b8dec684b4923b'

commit 29c6a7e33472139a60c46bcef3b8dec684b4923b
Author: Andrew Cagney <cagney at gnu.org>
Date:   Tue Apr 23 11:10:48 2019 -0400

    connections: allocate a connection and then use extract_connection() to fill it in
    
    Replace code populating the connection with mash up of shared pointers
    (shared with static memory, shared with the whack message, shared with
    a certificate, ...) and allocated data and then trying to unshare
    things
    
    Instead always allocate the connection and then populate it.  When
    things go wrong just call discard_connection().

commit 23bf7b14428508ce8128182d46af9e429bfaf379
Author: Andrew Cagney <cagney at gnu.org>
Date:   Tue Apr 23 12:09:42 2019 -0400

    connections: split discard_connection() off from delete_connection() and use LIST_RM()
    
    Where discard_connection() can delete a partially constructed
    connection without crashing or aborting.
    
    LIST_RM(), which replaces list_rm(), deals with the case where a
    partially constructed connection isn't expected to be in a list.



More information about the Swan-commit mailing list