laforge has submitted this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27806 )
Change subject: Fix NULL pointer dereference for pseudo channels
......................................................................
Fix NULL pointer dereference for pseudo channels
pseudo channels are characterized by the fact that they have their span
member set to NULL. This is illustrated by the is_pseudo_chan()
function.
However, when using RXMIRROR/TXMIRROR, __putbuf_chunk() is called not
just on the real channel, but also on the mirror (pseudo) channel.
Hence, __putbuf_chunk() and friends must not dereference the ->span
member without first checking that this channel actually does have
a non-NULL span assigned.
I originally thought that those unconditional de-references must have
been introduced after the RXMIRROR/TXMIRROR was merged - but checked the
git history and it seems like the bug has been present ever sicne
this functionality was merged in 2010 in commit
9090c6fcd289b497e00e8e5fb9cc3546e0dfe7d6
Change-Id: I747a696c9a5865c11461b6357a10346a8d0d1621
Closes: OS#5531
---
M drivers/dahdi/dahdi-base.c
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 96e4afd..2b6256b 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -9203,7 +9203,7 @@
buf[ms->readidx[ms->inreadbuf]++] = rxc;
/* Pay attention to the possibility of an overrun */
if (ms->readidx[ms->inreadbuf] >= ms->blocksize) {
- if (!ss->span->alarms)
+ if (ss->span && !ss->span->alarms)
module_printk(KERN_WARNING, "HDLC Receiver overrun on channel %s (master=%s)\n", ss->name, ss->master->name);
abort=DAHDI_EVENT_OVERRUN;
/* Force the HDLC state back to frame-search mode */
@@ -9375,7 +9375,7 @@
tasklet_schedule(&ms->ppp_calls);
} else
#endif
- if (test_bit(DAHDI_FLAGBIT_OPEN, &ms->flags) && !ss->span->alarms) {
+ if (test_bit(DAHDI_FLAGBIT_OPEN, &ms->flags) && ss->span && !ss->span->alarms) {
/* Notify the receiver... */
__qevent(ss->master, abort);
}
@@ -9443,7 +9443,7 @@
{
if (ss->inreadbuf >= 0)
ss->readidx[ss->inreadbuf] = 0;
- if (test_bit(DAHDI_FLAGBIT_OPEN, &ss->flags) && !ss->span->alarms)
+ if (test_bit(DAHDI_FLAGBIT_OPEN, &ss->flags) && ss->span && !ss->span->alarms)
__qevent(ss->master, event);
}
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27806
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I747a696c9a5865c11461b6357a10346a8d0d1621
Gerrit-Change-Number: 27806
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27806 )
Change subject: Fix NULL pointer dereference for pseudo channels
......................................................................
Fix NULL pointer dereference for pseudo channels
pseudo channels are characterized by the fact that they have their span
member set to NULL. This is illustrated by the is_pseudo_chan()
function.
However, when using RXMIRROR/TXMIRROR, __putbuf_chunk() is called not
just on the real channel, but also on the mirror (pseudo) channel.
Hence, __putbuf_chunk() and friends must not dereference the ->span
member without first checking that this channel actually does have
a non-NULL span assigned.
I originally thought that those unconditional de-references must have
been introduced after the RXMIRROR/TXMIRROR was merged - but checked the
git history and it seems like the bug has been present ever sicne
this functionality was merged in 2010 in commit
9090c6fcd289b497e00e8e5fb9cc3546e0dfe7d6
Change-Id: I747a696c9a5865c11461b6357a10346a8d0d1621
Closes: OS#5531
---
M drivers/dahdi/dahdi-base.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/06/27806/1
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 96e4afd..2b6256b 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -9203,7 +9203,7 @@
buf[ms->readidx[ms->inreadbuf]++] = rxc;
/* Pay attention to the possibility of an overrun */
if (ms->readidx[ms->inreadbuf] >= ms->blocksize) {
- if (!ss->span->alarms)
+ if (ss->span && !ss->span->alarms)
module_printk(KERN_WARNING, "HDLC Receiver overrun on channel %s (master=%s)\n", ss->name, ss->master->name);
abort=DAHDI_EVENT_OVERRUN;
/* Force the HDLC state back to frame-search mode */
@@ -9375,7 +9375,7 @@
tasklet_schedule(&ms->ppp_calls);
} else
#endif
- if (test_bit(DAHDI_FLAGBIT_OPEN, &ms->flags) && !ss->span->alarms) {
+ if (test_bit(DAHDI_FLAGBIT_OPEN, &ms->flags) && ss->span && !ss->span->alarms) {
/* Notify the receiver... */
__qevent(ss->master, abort);
}
@@ -9443,7 +9443,7 @@
{
if (ss->inreadbuf >= 0)
ss->readidx[ss->inreadbuf] = 0;
- if (test_bit(DAHDI_FLAGBIT_OPEN, &ss->flags) && !ss->span->alarms)
+ if (test_bit(DAHDI_FLAGBIT_OPEN, &ss->flags) && ss->span && !ss->span->alarms)
__qevent(ss->master, event);
}
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27806
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I747a696c9a5865c11461b6357a10346a8d0d1621
Gerrit-Change-Number: 27806
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria, pespin, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/27608 )
Change subject: mgcp_network: log RTP/RTCP reception failures
......................................................................
Patch Set 3:
(1 comment)
File src/libosmo-mgcp/mgcp_network.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/27608/comment/0c491a23_58717088
PS1, Line 1515: if (rc < 0) {
> Ack
indeed, we need specific information what has failed (in the code where that failure is detected) rather than some generic statement that "something" has failed. Also, keep in mind that RTP packets occur at high rates and we always have to be careful not to overload logs with tons of stuff.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/27608
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ic0e60fe2fb9d96b8ae18bb862b5715359a10e849
Gerrit-Change-Number: 27608
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 16 Apr 2022 08:47:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27791 )
Change subject: bsc: Expect number-of-broadcadsts-completed-list in CBSP KILL COMPLETE
......................................................................
bsc: Expect number-of-broadcadsts-completed-list in CBSP KILL COMPLETE
When responding to a CBSP KILL with a CBSP KILL COMPLETE, make sure
we include the optional "Number of Broadcasts Completed List" IE
in order to inform the CBC about how many times the just-killed
message had been broadcast before it was killed.
It seems some CBCs expect this IE to be present, while 3GPP TS 48.049
lists it as optional. osmo-bsc is including this IE as of Change-Id
I47aebd613dfc6dd9261ea9019a51aff0cd6470d8
This change updates the test suite to expect this IE to be included.
Change-Id: I5b56676c93479ec7b32cff66c9738fff7d0228cf
Related: SYS#5906
---
M bsc/BSC_Tests_CBSP.ttcn
1 file changed, 11 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn
index 0d8fb38..b291546 100644
--- a/bsc/BSC_Tests_CBSP.ttcn
+++ b/bsc/BSC_Tests_CBSP.ttcn
@@ -355,6 +355,7 @@
function f_cbsp_kill(uint16_t msg_id, uint16_t ser_no, template (omit) uint8_t channel_ind := 0,
template (value) BSSMAP_FIELD_CellIdentificationList cell_list := ts_BSSMAP_CIL_BSS,
template BSSMAP_FIELD_CellIdentificationList success_list := ?,
+ template CBSP_IE_NumBcastComplList compl_list := *,
template CBSP_FailureListItems fail_list := omit) runs on cbsp_test_CT
{
var template (value) CBSP_PDU tx;
@@ -363,10 +364,10 @@
tx := ts_CBSP_KILL(msg_id, ser_no, cell_list, channel_ind);
CBSP[0].send(ts_CBSP_Send(g_cbsp_conn_id[0], tx));
if (istemplatekind(fail_list, "omit")) {
- rx := tr_CBSP_KILL_COMPL(msg_id, ser_no, compl_list:=*, cell_list:=success_list,
+ rx := tr_CBSP_KILL_COMPL(msg_id, ser_no, compl_list:=compl_list, cell_list:=success_list,
channel_ind:=channel_ind);
} else {
- rx := tr_CBSP_KILL_FAIL(msg_id, ser_no, fail_list, compl_list:=*, cell_list:=success_list,
+ rx := tr_CBSP_KILL_FAIL(msg_id, ser_no, fail_list, compl_list:=compl_list, cell_list:=success_list,
channel_ind:=channel_ind);
}
alt {
@@ -784,7 +785,7 @@
f_init();
cell_list := ts_BSSMAP_CIL_LAC_CI({bssmap_lac_ci(mp_cgi_bts0)});
- f_cbsp_kill(g_cbsp_msg_id, g_cbsp_ser_no, 0, cell_list, success_list:=omit, fail_list:=?);
+ f_cbsp_kill(g_cbsp_msg_id, g_cbsp_ser_no, 0, cell_list, success_list:=omit, compl_list:=omit, fail_list:=?);
}
/* Write a message, then kill it */
testcase TC_cbsp_write_then_kill() runs on cbsp_test_CT {
@@ -793,9 +794,14 @@
g_pars := valueof(ts_CBSP_Pars_default(false, 13001, 13501));
f_init();
+ /* write message, request more than one transmission on BTS0 */
cell_list := ts_BSSMAP_CIL_LAC_CI({bssmap_lac_ci(mp_cgi_bts0)});
- f_cbsp_write(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, content:=pages, success_list:=?, fail_list:=omit);
- f_cbsp_kill(g_cbsp_msg_id, g_cbsp_ser_no, 0, cell_list, success_list:=?, fail_list:=omit);
+ f_cbsp_write(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, num_bcast_req := 5, content:=pages, success_list:=?, fail_list:=omit);
+ /* expect to receive it once on the BTS */
+ var template (present) RSL_Message tr := f_page2rsl(pages[0], g_cbsp_msg_id, g_cbsp_ser_no);
+ IPA_RSL[0].receive(tr_ASP_RSL_UD(tr));
+ /* kill it, expecting non-empty completion list */
+ f_cbsp_kill(g_cbsp_msg_id, g_cbsp_ser_no, 0, cell_list, success_list:=?, compl_list:=?, fail_list:=omit);
}
/* Write a message, then reset all messages */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27791
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5b56676c93479ec7b32cff66c9738fff7d0228cf
Gerrit-Change-Number: 27791
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged