Attention is currently required from: osmith.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582 )
Change subject: bssap_conn: fix missing length check
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc-nat/bssap_conn.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582/comment/0cfff071_f23be8f0
PS2, Line 60: len = IP_V4_ADDR_LEN;
Thanks for the suggestion! […]
AFAIR and from
waht you mention, msgb_put checks length by calling osmo_panic(), which is not desirable.
That osmo_panic is just to signal that something is really wrong in the caller code. So we
want proper checking here, not just osmo_panic.
I still think the proper way is to handle one check inside gsm0808_enc_aoip_trasp_addr()
and another one directly in this function for the path calling tlv_encode_one(). Because
for the first path, you always want to have that checked, and I'd expect that function
to check that. For the other path, you are really doing different stuff and it's fine
doing the check in the same function.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I1fc4c81e139bab3d7d977ef9467f62d8088884db
Gerrit-Change-Number: 28582
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 13 Jul 2022 12:25:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment