fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42588?usp=email )
Change subject: ipaccess: store Supported Features IE to the MO state
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42588?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic89d42c478677ffda4d544f461e7850dd3157040
Gerrit-Change-Number: 42588
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 08 Apr 2026 09:38:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria.
jolly has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42588?usp=email )
Change subject: ipaccess: store Supported Features IE to the MO state
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42588?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic89d42c478677ffda4d544f461e7850dd3157040
Gerrit-Change-Number: 42588
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 08 Apr 2026 09:26:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42587?usp=email )
Change subject: ipaccess: fix buffer overread in ipacc_parse_supp_flags()
......................................................................
ipaccess: fix buffer overread in ipacc_parse_supp_flags()
The loop used OSMO_MAX(e->len, 4), which iterates at least 4 times
even when the IE is shorter than 4 bytes, causing a buffer overread.
Replace with OSMO_MIN(e->len, sizeof(u32)) to cap the iteration both
at the actual IE length and at the uint32_t accumulator size.
Change-Id: I97c69a71eb650cbef1cc3652d0a2a966cfd6cf60
---
M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
jolly: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index 23196fc..a197a79 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -47,7 +47,7 @@
{
uint32_t u32 = 0;
- for (unsigned int i = 0; i < OSMO_MAX(e->len, 4); i++)
+ for (unsigned int i = 0; i < OSMO_MIN(e->len, sizeof(u32)); i++)
u32 |= e->val[i] << (i * 8);
for (const struct value_string *vs = flags; vs->value && vs->str; vs++) {
if (u32 & vs->value)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42587?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I97c69a71eb650cbef1cc3652d0a2a966cfd6cf60
Gerrit-Change-Number: 42587
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>