pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41950?usp=email )
Change subject: osmo_io: Fix misaligment of iofd->cmsg used as struct cmsghdr
......................................................................
osmo_io: Fix misaligment of iofd->cmsg used as struct cmsghdr
Fixes following ASAN runtime error:
"""
src/stream.c:398:47: runtime error: member access within misaligned address 0x516000012b81 for type 'struct cmsghdr', which requires 8 byte alignment
0x516000012b81: note: pointer points here
51 00 00 00 30 00 00 00 00 00 00 00 84 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03
^
"""
Related: OS#6905
Change-Id: Ia80dfc4dbffe85514b18dcf8d36b85bfafd76d64
---
M src/core/osmo_io_internal.h
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/41950/1
diff --git a/src/core/osmo_io_internal.h b/src/core/osmo_io_internal.h
index c15262b..7900a44 100644
--- a/src/core/osmo_io_internal.h
+++ b/src/core/osmo_io_internal.h
@@ -170,8 +170,11 @@
/*! msghdr is in the cancel_queue list */
bool in_cancel_queue;
- /*! control message buffer for passing sctp_sndrcvinfo along */
- char cmsg[0]; /* size is determined by iofd->cmsg_size on recvmsg, and by mcghdr->msg_controllen on sendmsg */
+ /*! control message buffer for passing sctp_sndrcvinfo along.
+ * Size is determined by iofd->cmsg_size on recvmsg, and by mcghdr->msg_controllen on sendmsg.
+ * Alignment of the array is required due to cast to "struct cmsghdr", eg. by CMSG_FIRSTHDR().
+ */
+ char cmsg[0] __attribute__ ((aligned(8)));
};
enum iofd_seg_act {
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41950?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia80dfc4dbffe85514b18dcf8d36b85bfafd76d64
Gerrit-Change-Number: 41950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: canghaiwuhen.
pespin has posted comments on this change by canghaiwuhen. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/41948?usp=email )
Change subject: Modified to dynamically adjust the returned QoS length to ensure compatibility with older modules.
......................................................................
Patch Set 3:
(3 comments)
File src/sgsn/gprs_sm.c:
https://gerrit.osmocom.org/c/osmo-sgsn/+/41948/comment/917e6626_43ca723f?us… :
PS3, Line 215: uint8_t qos_len = pdp->req_qos_len;
Ideally we should store a struct with the decoded fields parsed, and then use an encode counterpart which would encode amount of fields based on the parsed request. See how that's done in open5gs.git/lib/gtp/v1/types.c ogs_gtp1_parse_pdp_context() and ogs_gtp1_build_pdp_context().
https://gerrit.osmocom.org/c/osmo-sgsn/+/41948/comment/9af3517a_5a42526d?us… :
PS3, Line 217: qos_len = 3; // Safety fallback for R97
This is backed on 3GPP TS 24.008 10.5.6.5:
"""
A QoS IE received without octets 6-22, without octets 14-22, without octets 15-22, without octets 17-22, without
octets 19-22 or without octets 21-22 shall be accepted by the receiving entity.
NOTE: This behavior is required for interworking with entities supporting an earlier version of the protocol, or
when the Maximum bit rate for downlink or for downlink and uplink is negotiated to a value lower than
8700 kbps.
"""
https://gerrit.osmocom.org/c/osmo-sgsn/+/41948/comment/3a970f63_4b97991c?us… :
PS3, Line 221: msgb_lv_put(msg, qos_len, (uint8_t *)&default_qos);
let's better do:
uint8_t qos_len;
if (pdp->req_qos_len == 0 || pdp->req_qos_len > sizeof(default_qos))
qos_len = sizeof(default_qos);
else
qos_len = pdp->req_qos_len;
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/41948?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: I872d882de4ce186f644b1b3ab684963050709d4f
Gerrit-Change-Number: 41948
Gerrit-PatchSet: 3
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Comment-Date: Mon, 26 Jan 2026 14:43:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria, laforge.
dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/37925?usp=email )
Change subject: pySim-trace: pySim.apdu_source.stdin_hex
......................................................................
Patch Set 4: Code-Review+2 Verified+1
(1 comment)
Patchset:
PS4:
I have re-tested this and it seems to work fine. The reason why 00a40004023f0000 did not generate any output at first was that it is a SELECT APDU and since pySim-trace does suppress those by default, no output was visible. This lead to some confusion.
With
./pySim-trace.py --no-suppress-select stdin-hex
I get the expected output. As far as I can see, everything looks good to me and we could merge this patch now.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37925?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5aacf13b7c27cea9efd42f01dacca61068c3aa33
Gerrit-Change-Number: 37925
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 26 Jan 2026 14:14:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/41947?usp=email )
Change subject: rspro_server.c: Fix missing include for inet_ntoa()
......................................................................
rspro_server.c: Fix missing include for inet_ntoa()
This file was calling inet_ntoa() without including arpa/inet.h, which
is the header defining the function according to man and posix
documentation.
Change-Id: I49352bcc2b8e418e17453809354382bd37eb838e
---
M src/server/rspro_server.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c
index 1cc1af1..4e3666c 100644
--- a/src/server/rspro_server.c
+++ b/src/server/rspro_server.c
@@ -3,6 +3,7 @@
#include <unistd.h>
#include <pthread.h>
#include <errno.h>
+#include <arpa/inet.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/select.h>
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/41947?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I49352bcc2b8e418e17453809354382bd37eb838e
Gerrit-Change-Number: 41947
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-remsim/+/41947?usp=email )
Change subject: rspro_server.c: Fix missing include for inet_ntoa()
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I'll merge this now, so we don't have nightly OBS packages failing to build tomorrow.
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/41947?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I49352bcc2b8e418e17453809354382bd37eb838e
Gerrit-Change-Number: 41947
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 26 Jan 2026 14:09:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: canghaiwuhen.
canghaiwuhen has posted comments on this change by canghaiwuhen. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/41948?usp=email )
Change subject: Related: OS#6922 Modified to dynamically adjust the returned QoS length to ensure compatibility with older modules.
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Adjusted to dynamic return, with forced degradation in special cases.
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/41948?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: I872d882de4ce186f644b1b3ab684963050709d4f
Gerrit-Change-Number: 41948
Gerrit-PatchSet: 1
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Comment-Date: Mon, 26 Jan 2026 14:05:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
canghaiwuhen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/41942?usp=email )
Change subject: Modify the QoS length to ensure compatibility with some GPRS modules, such as Air20X.
......................................................................
Abandoned
https://gerrit.osmocom.org/c/osmo-sgsn/+/41948
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/41942?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: abandon
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee49745809195fe7d0897dd1e9cba2427ff7008e
Gerrit-Change-Number: 41942
Gerrit-PatchSet: 1
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-remsim/+/41947?usp=email )
Change subject: rspro_server.c: Fix missing include for inet_ntoa()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/41947?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I49352bcc2b8e418e17453809354382bd37eb838e
Gerrit-Change-Number: 41947
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 26 Jan 2026 13:43:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes