lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[XS] Change in libosmo-pfcp[master]: coverity CID#313611
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/37993?usp=email ) Change subject: coverity CID#313611 ...................................................................... coverity CID#313611 Change-Id: Ic5c87e029fe761b24ef9dcf801376da7b5a8d290 --- M src/libosmo-pfcp/pfcp_msg.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/93/37993/1 diff --git a/src/libosmo-pfcp/pfcp_msg.c b/src/libosmo-pfcp/pfcp_msg.c index 66f6e59..dbe992f 100644 --- a/src/libosmo-pfcp/pfcp_msg.c +++ b/src/libosmo-pfcp/pfcp_msg.c @@ -589,6 +589,11 @@ struct osmo_fsm_inst *fi = m ? (m->ctx.session_fi ?: m->ctx.peer_fi) : NULL; enum osmo_pfcp_cause *cause = m ? osmo_pfcp_msg_cause(m) : NULL; + if (!m) { + OSMO_STRBUF_PRINTF(sb, "NULL"); + return sb.chars_needed; + } + if (fi) OSMO_STRBUF_PRINTF(sb, "%s{%s}: ", osmo_fsm_inst_name(fi), -- To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/37993?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-pfcp Gerrit-Branch: master Gerrit-Change-Id: Ic5c87e029fe761b24ef9dcf801376da7b5a8d290 Gerrit-Change-Number: 37993 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-netif[master]: coverity CID#322728
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email ) Change subject: coverity CID#322728 ...................................................................... coverity CID#322728 Change-Id: Ia4c6b7c6f16331932e3f584b800e86d422a4f019 --- M src/stream.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/91/37991/1 diff --git a/src/stream.c b/src/stream.c index f8cbed6..6576259 100644 --- a/src/stream.c +++ b/src/stream.c @@ -275,7 +275,7 @@ /*! wrapper for regular synchronous sctp_recvmsg(3) */ int stream_sctp_recvmsg_wrapper(int fd, struct msgb *msg, const char *log_pfx) { - struct sctp_sndrcvinfo sinfo; + struct sctp_sndrcvinfo sinfo = {}; int flags = 0; int ret; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ia4c6b7c6f16331932e3f584b800e86d422a4f019 Gerrit-Change-Number: 37991 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-netif[master]: coverity
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email ) Change subject: coverity ...................................................................... coverity Make sure the signed operation works as expected, by casting to int before the operation takes place. Change-Id: I30beeac45ff2d8c08905986af9fabfda071ddc5b --- M src/rtp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/92/37992/1 diff --git a/src/rtp.c b/src/rtp.c index f4b0ada..bed587d 100644 --- a/src/rtp.c +++ b/src/rtp.c @@ -117,7 +117,7 @@ csrc_len = rtph->csrc_count << 2; payload = msg->data + sizeof(struct rtp_hdr) + csrc_len; - payload_len = msg->len - sizeof(struct rtp_hdr) - csrc_len; + payload_len = ((int)msg->len) - sizeof(struct rtp_hdr) - csrc_len; if (payload_len < 0) { DEBUGPC(DLMUX, "received RTP frame too short (len = %d, " "csrc count = %d)\n", msg->len, rtph->csrc_count); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I30beeac45ff2d8c08905986af9fabfda071ddc5b Gerrit-Change-Number: 37992 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in libasn1c[master]: coverity CID#27223
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37986?usp=email ) Change subject: coverity CID#27223 ...................................................................... coverity CID#27223 Make sure that bits_unused cannot subtract more bits than present in st->size. Especially when st->size == 0, this ensures that sizeinunits is also 0, and that a st->size == 0 hence never enters the while (sizeinunits) loop. Change-Id: Ib4d4d08dde9dc01403a62493ab6ae8b853b8a1ec --- M src/OCTET_STRING.c 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/86/37986/1 diff --git a/src/OCTET_STRING.c b/src/OCTET_STRING.c index 959c32e..d8f0f69 100644 --- a/src/OCTET_STRING.c +++ b/src/OCTET_STRING.c @@ -1699,6 +1699,7 @@ unsigned int unit_bits; unsigned int canonical_unit_bits; unsigned int sizeinunits; + unsigned int unused; const uint8_t *buf; int ret; enum { @@ -1728,7 +1729,11 @@ case ASN_OSUBV_BIT: canonical_unit_bits = unit_bits = 1; bpc = OS__BPC_BIT; - sizeinunits = st->size * 8 - (st->bits_unused & 0x07); + sizeinunits = st->size * 8; + /* make sure sizeinunits cannot wrap past zero (especially when st->size == 0). */ + unused = st->bits_unused & 0x07; + if (unused <= sizeinunits) + sizeinunits -= unused; ASN_DEBUG("BIT STRING of %d bytes, %d bits unused", sizeinunits, st->bits_unused); break; @@ -1827,8 +1832,10 @@ ret = OCTET_STRING_per_put_characters(po, buf, maySave, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); - } else { + } else if (buf) { ret = per_put_many_bits(po, buf, maySave * unit_bits); + } else { + _ASN_ENCODE_FAILED; } if(ret) _ASN_ENCODE_FAILED; -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37986?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: Ib4d4d08dde9dc01403a62493ab6ae8b853b8a1ec Gerrit-Change-Number: 37986 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in libasn1c[master]: coverity CID#27227
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37987?usp=email ) Change subject: coverity CID#27227 ...................................................................... coverity CID#27227 Pass the proper sizeof() argument. Use larger buffers, the string format suggests likely lengths > 31. Change-Id: I009735b8b5c47aa0a8369cda2abb946507b92150 --- M src/per_support.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/87/37987/1 diff --git a/src/per_support.c b/src/per_support.c index d536bc0..a1c5ae7 100644 --- a/src/per_support.c +++ b/src/per_support.c @@ -9,10 +9,10 @@ char * per_data_string(asn_per_data_t *pd) { - static char buf[2][32]; + static char buf[2][64]; static int n; n = (n+1) % 2; - snprintf(buf[n], sizeof(buf), + snprintf(buf[n], sizeof(buf[0]), "{m=%ld span %+ld[%d..%d] (%d)}", (long)pd->moved, (((long)pd->buffer) & 0xf), -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37987?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: I009735b8b5c47aa0a8369cda2abb946507b92150 Gerrit-Change-Number: 37987 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in libasn1c[master]: coverity CID#27247 CID#27248
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37988?usp=email ) Change subject: coverity CID#27247 CID#27248 ...................................................................... coverity CID#27247 CID#27248 Initialize local vars *after* null checking. Change-Id: Id442fa5105828b81edc3bf85bd65957f248b9b52 --- M src/OCTET_STRING.c M src/constr_CHOICE.c 2 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/88/37988/1 diff --git a/src/OCTET_STRING.c b/src/OCTET_STRING.c index d8f0f69..8f5a697 100644 --- a/src/OCTET_STRING.c +++ b/src/OCTET_STRING.c @@ -2085,15 +2085,17 @@ void OCTET_STRING_free(asn_TYPE_descriptor_t *td, void *sptr, int contents_only) { OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; - asn_OCTET_STRING_specifics_t *specs = td->specifics - ? (asn_OCTET_STRING_specifics_t *)td->specifics - : &asn_DEF_OCTET_STRING_specs; - asn_struct_ctx_t *ctx = (asn_struct_ctx_t *) - ((char *)st + specs->ctx_offset); + asn_OCTET_STRING_specifics_t *specs; + asn_struct_ctx_t *ctx; struct _stack *stck; if(!td || !st) return; + specs = td->specifics + ? (asn_OCTET_STRING_specifics_t *)td->specifics + : &asn_DEF_OCTET_STRING_specs; + ctx = (asn_struct_ctx_t *) + ((char *)st + specs->ctx_offset); ASN_DEBUG("Freeing %s as OCTET STRING", td->name); diff --git a/src/constr_CHOICE.c b/src/constr_CHOICE.c index df68feb..05e1182 100644 --- a/src/constr_CHOICE.c +++ b/src/constr_CHOICE.c @@ -1191,11 +1191,12 @@ void CHOICE_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) { - asn_CHOICE_specifics_t *specs = (asn_CHOICE_specifics_t *)td->specifics; + asn_CHOICE_specifics_t *specs; int present; if(!td || !ptr) return; + specs = (asn_CHOICE_specifics_t *)td->specifics; ASN_DEBUG("Freeing %s as CHOICE", td->name); -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37988?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: Id442fa5105828b81edc3bf85bd65957f248b9b52 Gerrit-Change-Number: 37988 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in libasn1c[master]: coverity: CID#27206
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37989?usp=email ) Change subject: coverity: CID#27206 ...................................................................... coverity: CID#27206 prevent negative bitshift. Change-Id: Ic6068277add1e336c67409d48211d45493153924 --- M src/per_support.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/89/37989/1 diff --git a/src/per_support.c b/src/per_support.c index a1c5ae7..7e55263 100644 --- a/src/per_support.c +++ b/src/per_support.c @@ -490,6 +490,9 @@ buf[2] = bits >> 8, buf[3] = bits; else { + /* sanity: prevent negative bitshift (CID#27206) */ + if (obits < 24) + return -1; per_put_few_bits(po, bits >> (obits - 24), 24); per_put_few_bits(po, bits, obits - 24); } -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37989?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: Ic6068277add1e336c67409d48211d45493153924 Gerrit-Change-Number: 37989 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in libasn1c[master]: coverity CID#57682
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37990?usp=email ) Change subject: coverity CID#57682 ...................................................................... coverity CID#57682 do not access ct->range_bits when ct == NULL. Change-Id: I03b831e9e90591fd205e7d0e66314e1ce7061d24 --- M src/constr_CHOICE.c 1 file changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/90/37990/1 diff --git a/src/constr_CHOICE.c b/src/constr_CHOICE.c index 05e1182..c7d7032 100644 --- a/src/constr_CHOICE.c +++ b/src/constr_CHOICE.c @@ -1077,6 +1077,7 @@ asn_per_constraint_t *ct; void *memb_ptr; int present; + asn_enc_rval_t rval; if(!sptr) _ASN_ENCODE_FAILED; @@ -1136,18 +1137,18 @@ return elm->type->aper_encoder(elm->type, elm->per_constraints, memb_ptr, po); - } else { - asn_enc_rval_t rval; - if(specs->ext_start == -1) - _ASN_ENCODE_FAILED; + } + + if(specs->ext_start == -1) + _ASN_ENCODE_FAILED; + if (ct) { if(aper_put_nsnnwn(po, ct->range_bits, present - specs->ext_start)) _ASN_ENCODE_FAILED; - if(aper_open_type_put(elm->type, elm->per_constraints, - memb_ptr, po)) - _ASN_ENCODE_FAILED; - rval.encoded = 0; - _ASN_ENCODED_OK(rval); } + if(aper_open_type_put(elm->type, elm->per_constraints, memb_ptr, po)) + _ASN_ENCODE_FAILED; + rval.encoded = 0; + _ASN_ENCODED_OK(rval); } int -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37990?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: I03b831e9e90591fd205e7d0e66314e1ce7061d24 Gerrit-Change-Number: 37990 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in libasn1c[master]: coverity CID#27224
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37985?usp=email ) Change subject: coverity CID#27224 ...................................................................... coverity CID#27224 prevent st->buf == NULL dereference. Change-Id: I6760be87dfa5281d79f6ebfb749b09179192ba3c --- M src/OCTET_STRING.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/85/37985/1 diff --git a/src/OCTET_STRING.c b/src/OCTET_STRING.c index 9d2e817..959c32e 100644 --- a/src/OCTET_STRING.c +++ b/src/OCTET_STRING.c @@ -1798,10 +1798,11 @@ ret = OCTET_STRING_per_put_characters(po, st->buf, sizeinunits, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); - } else { + } else if (st->buf) { ret = per_put_many_bits(po, st->buf, sizeinunits * unit_bits); - } + } else + _ASN_ENCODE_FAILED; if(ret) _ASN_ENCODE_FAILED; _ASN_ENCODED_OK(er); } -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37985?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: I6760be87dfa5281d79f6ebfb749b09179192ba3c Gerrit-Change-Number: 37985 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in libasn1c[master]: coverity CID#57681
by neels 03 Sep '24

03 Sep '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libasn1c/+/37984?usp=email ) Change subject: coverity CID#57681 ...................................................................... coverity CID#57681 Make sure that bits_unused cannot subtract more bits than present in st->size. Especially when st->size == 0, this ensures that sizeinunits is also 0, and that a st->size == 0 hence never enters the while (sizeinunits) loop. Change-Id: Ic8e3f5e24541989b79826de2942e5e6560079028 --- M src/OCTET_STRING.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libasn1c refs/changes/84/37984/1 diff --git a/src/OCTET_STRING.c b/src/OCTET_STRING.c index 3e424e7..9d2e817 100644 --- a/src/OCTET_STRING.c +++ b/src/OCTET_STRING.c @@ -1859,6 +1859,7 @@ unsigned int unit_bits; unsigned int canonical_unit_bits; unsigned int sizeinunits; + unsigned int unused; const uint8_t *buf; int ret; enum { @@ -1888,7 +1889,11 @@ case ASN_OSUBV_BIT: canonical_unit_bits = unit_bits = 1; bpc = OS__BPC_BIT; - sizeinunits = st->size * 8 - (st->bits_unused & 0x07); + sizeinunits = st->size * 8; + /* make sure sizeinunits cannot wrap past zero (especially when st->size == 0). */ + unused = st->bits_unused & 0x07; + if (unused <= sizeinunits) + sizeinunits -= unused; ASN_DEBUG("BIT STRING of %d bytes", sizeinunits); break; @@ -1994,6 +1999,9 @@ maySave, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); } else { + /* coverity CID#57681: st->buf can be NULL, but above, we've verified that when st->buf == NULL, + * then also st->size == 0, and hence sizeinunits == 0, hence this 'while' will skip entirely, + * and hence it is safe to dereference buf here. */ ret = per_put_many_bits(po, buf, maySave * unit_bits); } if(ret) _ASN_ENCODE_FAILED; -- To view, visit https://gerrit.osmocom.org/c/libasn1c/+/37984?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Change-Id: Ic8e3f5e24541989b79826de2942e5e6560079028 Gerrit-Change-Number: 37984 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.