daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33104 )
Change subject: ipa-stream-server: Return -EBADF in read_cb after osmo_stream_srv_destroy()
......................................................................
ipa-stream-server: Return -EBADF in read_cb after osmo_stream_srv_destroy()
This fixes a potential heap-use-after-free error.
When there is still data to be written the osmo_stream_srv_cb() will
call osmo_stream_srv_write() which will try to dereference conn even
though it has already been freed.
Change-Id: I5ac1920b8d4ce3b0205f00d253e7ed878fb745e3
---
M examples/ipa-stream-server.c
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/04/33104/1
diff --git a/examples/ipa-stream-server.c b/examples/ipa-stream-server.c
index c311697..e01a3cb 100644
--- a/examples/ipa-stream-server.c
+++ b/examples/ipa-stream-server.c
@@ -61,7 +61,7 @@
LOGP(DSTREAMTEST, LOGL_ERROR, "cannot receive message\n");
osmo_stream_srv_destroy(conn);
msgb_free(msg);
- return 0;
+ return -EBADF;
}
if (osmo_ipa_process_msg(msg) < 0) {
LOGP(DSTREAMTEST, LOGL_ERROR, "Bad IPA message\n");
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33104
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I5ac1920b8d4ce3b0205f00d253e7ed878fb745e3
Gerrit-Change-Number: 33104
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/32926 )
Change subject: mgcp_codec: be sensitive about IuFP when checking codecs
......................................................................
mgcp_codec: be sensitive about IuFP when checking codecs
When two codecs are checked for convertibility we insist that
subtype_name and rate are equal since normally when those are different,
we assume a completely different codec that will require a transcoder,
which we do not have yet.
However when IuFP is used, the call agent will always negotiate IuFP as
VND.3GPP.IUFP with a rate of 16000, even though the IuFP payloads
contain regular AMR at a rate of 8000.
This means that if we detect IuFP on one side of the call leg and AMR on
the other side of the call leg, we must not insist on equal subtype_name
and rate.
This fixes the following TTCN3 testcases:
MGCP_Test.TC_two_crcx_mdcx_and_iuup_rtp
MGCP_Test.TC_two_crcx_mdcx_and_iuup_rtp_rfci_unordered
Related: OS#5461
Change-Id: I6bc1e6022efe21cb893ef213f3da35017960357d
---
M src/libosmo-mgcp/mgcp_codec.c
1 file changed, 37 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c
index 905795c..d340e11 100644
--- a/src/libosmo-mgcp/mgcp_codec.c
+++ b/src/libosmo-mgcp/mgcp_codec.c
@@ -330,10 +330,20 @@
/* OsmoMGW currently has no ability to transcode from one codec to another. However OsmoMGW is still able to
* translate between different payload formats as long as the encoded voice data itself does not change.
* Therefore we must insist on equal codecs but still allow different payload formatting. */
+
+ /* In 3G IuUP, AMR may be encapsulated in IuFP, this means even though the codec name and negotiated rate is
+ * different, the formatting can still be converted by OsmoMGW. Therefore we won't insist on equal
+ * subtype_name and rate if we detect IuFP and AMR is used on the same tandem. */
+ if (strcmp(codec_a->subtype_name, "AMR") == 0 && strcmp(codec_b->subtype_name, "VND.3GPP.IUFP") == 0)
+ goto iufp;
+ if (strcmp(codec_a->subtype_name, "VND.3GPP.IUFP") == 0 && strcmp(codec_b->subtype_name, "AMR") == 0)
+ goto iufp;
+
if (strcmp(codec_a->subtype_name, codec_b->subtype_name))
return false;
if (codec_a->rate != codec_b->rate)
return false;
+iufp:
if (codec_a->channels != codec_b->channels)
return false;
if (codec_a->frame_duration_num != codec_b->frame_duration_num)
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/32926
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I6bc1e6022efe21cb893ef213f3da35017960357d
Gerrit-Change-Number: 32926
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33096 )
Change subject: Introduce support for XOR-2G algorithm
......................................................................
Patch Set 3:
(1 comment)
File src/hlr_vty_subscr.c:
https://gerrit.osmocom.org/c/osmo-hlr/+/33096/comment/a17ae70a_5573e3d1
PS3, Line 665: SUBSCR_UPDATE "aud3g xor-3g k K"
> this is not a configuration command, but one from the ENABLE node. […]
ACK
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33096
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6
Gerrit-Change-Number: 33096
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 31 May 2023 09:22:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33087 )
Change subject: libosmogsm: Support authentication with 256-bit K and/or OP/OPc
......................................................................
Patch Set 4:
(1 comment)
File include/osmocom/crypt/auth.h:
https://gerrit.osmocom.org/c/libosmocore/+/33087/comment/495baebf_768c7ef3
PS4, Line 121: OSMO_DEPRECATED_OUTSIDE("Use osmo_auth_gen_vec2 instead");
> yes, we are. On the one hand there is osmo-auc-gen, which is ported in a follow-up patch. […]
good then.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33087
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
Gerrit-Change-Number: 33087
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 31 May 2023 09:22:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/33096 )
Change subject: Introduce support for XOR-2G algorithm
......................................................................
Patch Set 3:
(1 comment)
File src/hlr_vty_subscr.c:
https://gerrit.osmocom.org/c/osmo-hlr/+/33096/comment/3817790e_9d75f621
PS3, Line 665: SUBSCR_UPDATE "aud3g xor-3g k K"
> you are breaking old configs here. You may want to add a deprecated entry linking to this new one.
this is not a configuration command, but one from the ENABLE node. So I'm breaking "only" the user interface, but not any old configs.
Given that I doubt there ever were many users of XOR, and it's just one step to look into the vty reference manual (or even just tab completion) to find the new command, I think we are fine here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/33096
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I039a1f84fda54a908a82fe621e7fd078cb85e4c6
Gerrit-Change-Number: 33096
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 31 May 2023 09:21:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33087 )
Change subject: libosmogsm: Support authentication with 256-bit K and/or OP/OPc
......................................................................
Patch Set 4:
(1 comment)
File include/osmocom/crypt/auth.h:
https://gerrit.osmocom.org/c/libosmocore/+/33087/comment/86bc710a_a904bdfd
PS4, Line 121: OSMO_DEPRECATED_OUTSIDE("Use osmo_auth_gen_vec2 instead");
> OSMO_DEPRECATED_OUTSIDE vs OSMO_DEPRECATED. […]
yes, we are. On the one hand there is osmo-auc-gen, which is ported in a follow-up patch. Then there is the IPA based OAP (osmo auth protocol), which even has static_assert around sizes of fields in the old sub_auth_data structures. This code is not use by anyone in ages and I have no interest in porting it.
Last, but not least, there are all the authentication related unit tests which use the old API. I actually consider that a good thing, as that way we can be reasonably sure that this changeset doesn't break old users.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33087
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
Gerrit-Change-Number: 33087
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 31 May 2023 09:19:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment