HomePhabricator

[avalanche] Fix a potential use after free issue

Description

[avalanche] Fix a potential use after free issue

Summary:
There is a typo introduced in D10711. We need to access the proof associated with a peer after it gets deleted, so we copy the shared pointer. Unfortunately there is a place where the original pointer was used instead, causing a potential use after free issue.

Ref T1854.

Test Plan:

./contrib/teamcity/build-configurations.py build-asan

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1854

Differential Revision: https://reviews.bitcoinabc.org/D11026

Details

Provenance
FabienAuthored on Feb 9 2022, 09:36
FabienPushed on Feb 9 2022, 10:33
Reviewer
Restricted Project
Differential Revision
D11026: [avalanche] Fix a potential use after free issue
Parents
rABC5711d09db8c3: [avalanche] Update our position according to the vote
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task