Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d77e5333 authored by Henri Chataing's avatar Henri Chataing
Browse files

RootCanal: Fix potential use-after-free issues

The tasks registered within LinkLayerController capture
the pointer to the Controller instance for member access.
These tasks can outlive the Controller instance if the
controller is deleted (e.g. through the test channel, or
because the TCP connection is lost). In this case
attempting to execute the task callback would cause a
use-after-free invalid pointer access.

This change bypasses the issue by capturing a weak pointer
to the instance to check if it is live before running the
task callback.

Test: m root-canal && launch_cvd
Change-Id: I5384fc056fc4fbc0095b99ef7113fd4f706803ba
parent 069a7c41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment