Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/43419?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: xua_snm: Validate Affected PCs follow configured formatting
......................................................................
xua_snm: Validate Affected PCs follow configured formatting
Avoid handling unexpected point codes being out of range regarding the
point code formatting configured at the SS/ instance.
In the case of DAUD, simply answer stating the unexpected PC is
unavailable.
Change-Id: I4cb19d11e0ca885dd6d717b5fb67be92bc01fd13
---
M include/osmocom/sigtran/osmo_ss7.h
M src/ss7_instance.c
M src/xua_snm.c
3 files changed, 41 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/19/43419/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43419?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I4cb19d11e0ca885dd6d717b5fb67be92bc01fd13
Gerrit-Change-Number: 43419
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43420?usp=email )
Change subject: testenv/README: automatic backtraces for coredumps
......................................................................
testenv/README: automatic backtraces for coredumps
Add documentation for this feature.
Change-Id: I9b65bfb14853edb03ddb571867bb795bde9d495c
---
M _testenv/README.md
1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/43420/1
diff --git a/_testenv/README.md b/_testenv/README.md
index 710c021..3496785 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -309,6 +309,19 @@
Switching between the versions is done either by setting a `titan_min` version
in `testsrcdir.cfg`, or by using `-T` / `--titan-version`.
+## Automatic backtraces for coredumps
+
+When your SUT crashes with a coredump, testenv automatically runs `gdb` to get
+a backtrace, displays it in the output and writes it along with the other logs
+into a `.backtrace` file.
+
+For this to work, you either need to have `systemd-coredump` set up, or
+alternatively have a core pattern in `/proc/sys/kernel/core_pattern` starting
+with `core`.
+
+Executables that do not start with a relevant prefix (`osmo-` or `open5gs-`)
+get ignored, see `testenv.coredump.executable_is_relevant()`.
+
## Troubleshooting
### Timeout waiting for RESET-ACK after sending RESET
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43420?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9b65bfb14853edb03ddb571867bb795bde9d495c
Gerrit-Change-Number: 43420
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43418?usp=email )
Change subject: xua_snm: Trim received Affected PC Mask to configured PC width
......................................................................
xua_snm: Trim received Affected PC Mask to configured PC width
The mask byte in the Affected PCs IE was so far directly controlled
by the peer sending the message to us.
As a result, values much bigger than expected (>14 in ITU and >24 in
ANSI) were being used as is, ending up in incorrect bitmasks being
generated and in turn resulting in potential endless loops and memory
allocation to fullfill up to ~2^30 combinations.
Related: OS#7078
Reported-By: Tristan Madani <tristan(a)talencesecurity.com>
Change-Id: Ie178ff4b9fcbab16ca9d13b96fd689c4a57e8023
---
M src/xua_snm.c
1 file changed, 21 insertions(+), 4 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 2abc42e..6befecc 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -48,6 +48,20 @@
osmo_static_assert(M3UA_IEI_ROUTE_CTX == SUA_IEI_ROUTE_CTX, _sa_rctx);
osmo_static_assert(M3UA_IEI_INFO_STRING == SUA_IEI_INFO_STRING, _sa_inf_str);
+/* Get "Mask" field from M3UA/SUA "Affected Point Code" IE and trim it to subset of
+ * Point Codes available in this instance.
+ * This prevents creating incorrect bitmasks and ending up in long loops based on peer
+ * inputting unexpected big values (ie. >14 on ITU and >24 on ANSI).
+ */
+static uint8_t mask_from_affected_pc(const struct osmo_ss7_instance *s7i, uint8_t aff_pc)
+{
+ const uint8_t pc_width = osmo_ss7_pc_width(&s7i->cfg.pc_fmt);
+ uint8_t mask = aff_pc >> 24;
+ if (mask > pc_width)
+ return pc_width;
+ return mask;
+}
+
static const char *format_affected_pcs_c(void *ctx, const struct osmo_ss7_instance *s7i,
const struct xua_msg_part *ie_aff_pc)
{
@@ -60,6 +74,7 @@
uint32_t _aff_pc = ntohl(aff_pc[i]);
uint32_t pc = _aff_pc & 0xffffff;
uint8_t mask = _aff_pc >> 24;
+ /* No need to call mask_from_affected_pc() here, we want to print what we actually received. */
/* append point code + mask */
out = talloc_asprintf_append(out, "%s%s/%u", i == 0 ? "" : ", ",
@@ -144,7 +159,7 @@
* see RFC 4666 3.4.1 */
uint32_t _aff_pc = ntohl(aff_pc[i]);
uint32_t pc = _aff_pc & 0xffffff;
- uint8_t mask = _aff_pc >> 24;
+ uint8_t mask = mask_from_affected_pc(s7i, _aff_pc);
if (!mask) {
if (available)
@@ -200,12 +215,14 @@
const uint32_t *aff_pc, unsigned int num_aff_pc,
bool available)
{
+ const struct osmo_ss7_instance *s7i = as->inst;
+
for (unsigned int i = 0; i < num_aff_pc; i++) {
/* 32bit "Affected Point Code" consists of a 7-bit mask followed by 14/16/24-bit SS7 PC,
* see RFC 4666 3.4.1 */
uint32_t _aff_pc = ntohl(aff_pc[i]);
uint32_t pc = _aff_pc & 0xffffff;
- uint8_t mask = _aff_pc >> 24;
+ uint8_t mask = mask_from_affected_pc(s7i, _aff_pc);
if (!mask) {
xua_snm_srm_pc_available_single(as, pc, available);
@@ -349,7 +366,7 @@
* see RFC 4666 3.4.1 */
uint32_t _aff_pc = ntohl(aff_pc[i]);
uint32_t pc = _aff_pc & 0xffffff;
- uint8_t mask = _aff_pc >> 24;
+ uint8_t mask = mask_from_affected_pc(s7i, _aff_pc);
if (!mask) {
mtp_status_ind_up_to_all_users(s7i, pc, MTP_UNAVAIL_C_CONGESTED,
@@ -430,7 +447,7 @@
for (i = 0; i < num_aff_pc; i++) {
uint32_t _aff_pc = ntohl(aff_pc[i]);
uint32_t pc = _aff_pc & 0xffffff;
- uint8_t mask = _aff_pc >> 24;
+ uint8_t mask = mask_from_affected_pc(s7i, _aff_pc);
bool is_available;
if (mask == 0) {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43418?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ie178ff4b9fcbab16ca9d13b96fd689c4a57e8023
Gerrit-Change-Number: 43418
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>