aboutsummaryrefslogtreecommitdiffstats
path: root/osmoappdesc.py
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-11-18 22:19:55 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-11-20 13:49:32 +0000
commit1a5bcd5c3b3c84dbd1bf99fe08eaab51370fbef9 (patch)
treee01fbaf5e66f4223ad430489c2ec347599bf8832 /osmoappdesc.py
parentc6bf27466ce66dfe3326e129713dbbdc8cdbf2af (diff)
sub_pres_vlr_fsm_start: fix heap use after free
When sub_pres_vlr_fsm_start() is called, it dispatches an event which may in some cases already cause tear down and free of the parent FSM instance, after which storing the returned instance pointer in that parent's metadata will use freed memory. Instead, pass the target pointer to remember the instance at to sub_pres_vlr_fsm_start() and assign the pointer *before* firing the event. Explain so in a new comment. I haven't checked whether that pointer is actually used at all -- this is the easiest way to fix the use-after-free without getting sucked into semantic questions. Change-Id: Ibdc0b64cd12ba3e2b9737e3517d8484e67abcf04
Diffstat (limited to 'osmoappdesc.py')
0 files changed, 0 insertions, 0 deletions