Harald Welte
a172e9e231
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 |
||
---|---|---|
contrib | ||
debian | ||
doc | ||
include | ||
m4 | ||
src | ||
tests | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
AUTHORS | ||
COPYING | ||
Makefile.am | ||
README | ||
README.vty-tests | ||
configure.ac | ||
git-version-gen | ||
osmoappdesc.py |
README
About OsmoMSC ============= OsmoMSC originated from the OpenBSC project, which started as a minimalistic all-in-one implementation of the GSM Network. In 2017, OpenBSC had reached maturity and diversity (including M3UA SIGTRAN and 3G support in the form of IuCS and IuPS interfaces) that naturally lead to a separation of the all-in-one approach to fully independent separate programs as in typical GSM networks. OsmoMSC was one of the parts split off from the old openbsc.git. Before, it was the libmsc part of the old OsmoNITB. Since a true A interface and IuCS for 3G support is available, OsmoMSC exists only as a separate standalone entity. OsmoMSC exposes - GSUP towards OsmoHLR (or a MAP proxy); - A over IP towards a BSC (e.g. OsmoBSC); - IuCS towards an RNC or HNB-GW (e.g. OsmoHNBGW) for 3G voice; - MNCC (Mobile Network Call Control derived from GSM TS 04.07); - SMPP 3.4 (Short Message Peer-to-Peer); - The Osmocom typical telnet VTY and CTRL interfaces. Find OsmoMSC issue tracker and wiki online at https://osmocom.org/projects/osmomsc https://osmocom.org/projects/osmomsc/wiki