Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/43323?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: ranap: reject oversized RANAP NAS-PDU
......................................................................
ranap: reject oversized RANAP NAS-PDU
The connection-oriented RANAP handlers ranap_handle_co_initial_ue() and
ranap_handle_co_dt() copy the attacker-controlled NAS-PDU into a msgb
allocated with a fixed 256 bytes. RANAP NAS-PDU is an unconstrained
OCTET STRING, so the APER decoder accepts an arbitrarily large PDU; when
nas_pdu.size exceeds the msgb tailroom, msgb_put() hits MSGB_ABORT and
osmo_panic()s the process (MSGB_DEBUG is compiled in unconditionally),
which a femtocell (HNB) peer can use to crash osmo-hnbgw / osmo-hnodeb
by sending an InitialUE or DirectTransfer with a NAS-PDU > 256 bytes.
Validate nas_pdu.size against the msgb tailroom and drop the message
gracefully instead of panicking.
This issue has been assigned the CVE candidate identifier
CAN-2026-2051037.
This is a backport from osmo-iuh.git f06967126f486bcb185ccf3d1a8f9bc02c4da1f6
Change-Id: I2090c7acbf861dfc295a82ef32a976ea7742438b
---
M src/sgsn/gprs_ranap.c
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/23/43323/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43323?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I2090c7acbf861dfc295a82ef32a976ea7742438b
Gerrit-Change-Number: 43323
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43323?usp=email )
Change subject: ranap: reject oversized RANAP NAS-PDU
......................................................................
ranap: reject oversized RANAP NAS-PDU
The connection-oriented RANAP handlers ranap_handle_co_initial_ue() and
ranap_handle_co_dt() copy the attacker-controlled NAS-PDU into a msgb
allocated with a fixed 256 bytes. RANAP NAS-PDU is an unconstrained
OCTET STRING, so the APER decoder accepts an arbitrarily large PDU; when
nas_pdu.size exceeds the msgb tailroom, msgb_put() hits MSGB_ABORT and
osmo_panic()s the process (MSGB_DEBUG is compiled in unconditionally),
which a femtocell (HNB) peer can use to crash osmo-hnbgw / osmo-hnodeb
by sending an InitialUE or DirectTransfer with a NAS-PDU > 256 bytes.
Validate nas_pdu.size against the msgb tailroom and drop the message
gracefully instead of panicking.
This issue has been assigned the CVE candidate identifier
CAN-2026-2051037.
This is a backport from osmo-iuh.git f06967126f486bcb185ccf3d1a8f9bc02c4da1f6
Change-Id: I2090c7acbf861dfc295a82ef32a976ea7742438b
---
M src/sgsn/gprs_ranap.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/23/43323/1
diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 70b1260..6f068d7 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -405,6 +405,13 @@
}
sai = asn1str_to_u16(&ies->sai.sAC);
+ if (ies->nas_pdu.size > msgb_tailroom(msg)) {
+ LOGP(DRANAP, LOGL_ERROR,
+ "RANAP InitialUE: NAS-PDU size %d > tailroom %d, dropping\n",
+ ies->nas_pdu.size, msgb_tailroom(msg));
+ msgb_free(msg);
+ return -1;
+ }
msgb_gmmh(msg) = msgb_put(msg, ies->nas_pdu.size);
memcpy(msgb_gmmh(msg), ies->nas_pdu.buf, ies->nas_pdu.size);
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43323?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I2090c7acbf861dfc295a82ef32a976ea7742438b
Gerrit-Change-Number: 43323
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-iuh/+/43320?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Bump version: 1.8.0.4-662e-dirty → 1.8.1
......................................................................
Bump version: 1.8.0.4-662e-dirty → 1.8.1
Change-Id: I343c885a93d5ab71816821e85a0a414b00006863
---
M TODO-RELEASE
M debian/changelog
M src/Makefile.am
3 files changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/20/43320/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/43320?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I343c885a93d5ab71816821e85a0a414b00006863
Gerrit-Change-Number: 43320
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43322?usp=email )
Change subject: ranap: Fix msgb leak on decode error paths
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43322?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I4dcd7efc39c3cde052bbd258e4bdd3d13ccf7467
Gerrit-Change-Number: 43322
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 20 Aug 2026 10:04:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes