aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-09 21:33:24 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-09 22:21:20 +0100
commita172e9e231b7f37016dc2a8d443cc64cbc6fa898 (patch)
tree3a62faafb3898def328d64a2de80693a4d497bf3 /m4
parent1f477442dd508a01d8d6bc64e9ed593ba5fddb3f (diff)
a_iface: Fix heap-use-after-free by cleaning up msgb ownership
When we receive a msgb-wrapped primitive from the SCCP provider (stack), it transfers msgb ownership to us (the SCCP user). The existing code passed the msgb ownership down into all the various downstream functions, which each then had to take care of msgb free'ing. Not all of the paths did eventually free the msgb. And at least one path used data from the primitive *after* the free Let's restructure this in a way that no msgb ownership is transferred down the call chain. Instead, there's one common msgb_free() in sccp_sap_up(). We can do this as nobody is queueing or otherwise keeping the msgb. Change-Id: Ie65616ccb55ec58a0224bbe3c8e004e6029ef3e6 SUMMARY: AddressSanitizer: heap-use-after-free /home/laforge/projects/git/osmo-msc/src/libmsc/a_iface.c:538 in sccp_sap_up
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions