laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/28513 )
Change subject: host/cardem: fix integer overflow in process_do_rx_da()
......................................................................
host/cardem: fix integer overflow in process_do_rx_da()
osmo_apdu_segment_in() may return a negative number on receipt of
"unknown APDU case", and that would crash simtrace2-cardem-pcsc:
msgb(0x55d2cf7aa8a0): Not enough tailroom msgb_put
(allocated 920, head at 0, len 7, tailroom 1017 < want tailroom 65534)
backtrace() returned 19 addresses
Whenever osmo_apdu_segment_in() fails to recognize an APDU, the
communication is broken, because we don't know if we should continue
transmitting or receiving. Only a successful return value by would
allow us to know this. Do not crash, exit() gracefully.
Change-Id: I9e97b955a28ec886a429d744f9316e7e71be4481
Related: OS#5600
---
M host/src/simtrace2-cardem-pcsc.c
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/host/src/simtrace2-cardem-pcsc.c b/host/src/simtrace2-cardem-pcsc.c
index 4820f36..374966d 100644
--- a/host/src/simtrace2-cardem-pcsc.c
+++ b/host/src/simtrace2-cardem-pcsc.c
@@ -167,6 +167,13 @@
rc = osmo_apdu_segment_in(&ac, data->data, data->data_len,
data->flags & CEMU_DATA_F_TPDU_HDR);
+ if (rc < 0) {
+ /* At this point the communication is broken. We cannot keep running, as we
+ * don't know if we should continue transmitting or receiving. Only a successful
+ * return value by osmo_apdu_segment_in() would allow us to know this. */
+ LOGCI(ci, LOGL_FATAL, "Failed to recognize APDU, terminating\n");
+ exit(1);
+ }
if (rc & APDU_ACT_TX_CAPDU_TO_CARD) {
struct msgb *tmsg = msgb_alloc(1024, "TPDU");
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/28513
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9e97b955a28ec886a429d744f9316e7e71be4481
Gerrit-Change-Number: 28513
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28494 )
Change subject: MGCP_Test: fix TC_dlcx_wildcarded
......................................................................
MGCP_Test: fix TC_dlcx_wildcarded
When the final condition of the testcase is verified through statsd,
there may be still (invalid) data from a previous measurement in the
statsd pipeline, querying the stats once before verifying the actual
stats fixes the problem.
Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3
Related: OS#5572
---
M mgw/MGCP_Test.ttcn
1 file changed, 8 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
daniel: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 60f955f..0242db9 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1118,8 +1118,14 @@
cmd := ts_DLCX(get_next_trans_id(), ep);
mgcp_transceive_mgw(cmd, rtmpl);
- /* The second interval must resturn a result with 0 endpoints in use. */
- f_sleep(1.0)
+ /* Query a the statsd once to ensure that intermediate results are pulled from the
+ * pipeline. The second query (below) will return the actual result. */
+ expect := {
+ { name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := n_endpoints}
+ };
+ f_statsd_expect(expect);
+
+ /* The second query must resturn a result with 0 endpoints in use. */
expect := {
{ name := "TTCN3.trunk.virtual-0.common.endpoints.used", mtype := "g", min := 0, max := 0}
};
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28494
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3
Gerrit-Change-Number: 28494
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith, fixeria, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/28557 )
Change subject: contrib/jenkins: don't run "make distcheck" on arm
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> I am fine with not running `make distcheck` on RPi slaves. […]
I also agree the test can be skipped. The 'distcheck' really checks whether or not we have correctly put together our Makefile.am, e.g. added all the include files etc. - this is not really testing anything specific to the host architecture.
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/28557
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib4fbf7d54d479bbdda3c1415493bfc57b37d3971
Gerrit-Change-Number: 28557
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Jul 2022 19:14:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment