Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2021-06-12 Thread lynxis lazus
lynxis lazus has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Abandoned

I98211fb0684a973239f5760e1de52a24a1f4c33c has been merged.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-MessageType: abandon


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2021-04-12 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1:

This change can be abandoned now, since 
I98211fb0684a973239f5760e1de52a24a1f4c33c has been merged.


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Assignee: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Mon, 12 Apr 2021 17:26:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2021-04-05 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1: Code-Review-2

So, I ended up spending more time on it and taking a more radical approach:

https://gerrit.osmocom.org/c/osmo-bsc/+/23645 [hopping] vty: ensure no 
duplicate hopping ARFCN entries [NEW]
https://gerrit.osmocom.org/c/osmo-bsc/+/23646 [hopping] 
generate_cell_chan_list(): make some pointers const [NEW]
https://gerrit.osmocom.org/c/osmo-bsc/+/23647 [hopping] 
gsm48_send_rr_ass_cmd(): use Cell Channel Description from SI1 [NEW]
https://gerrit.osmocom.org/c/osmo-bsc/+/23648 [hopping] generate_ma_for_ts() 
returns no meaningful value [NEW]
https://gerrit.osmocom.org/c/osmo-bsc/+/23649 [hopping] Rework generation of 
Cell/Mobile Allocation [NEW]
https://gerrit.osmocom.org/c/osmo-bsc/+/23650 [hopping] bootstrap_rsl(): do not 
call generate_ma_for_ts() again [NEW]

TL;DR, the idea is to mitigate the possibility of having more than 64 ARFCNs in 
the Channel Allocation during the configuration, rather than surprising the 
user at run-time.


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Assignee: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 06 Apr 2021 03:04:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2021-04-01 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1:

> Patch Set 1:
>
> @fixeria, ping?

I have reworked this patch, still need to test it.


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Assignee: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Thu, 01 Apr 2021 15:35:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2021-04-01 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1:

@fixeria, ping?


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Assignee: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Thu, 01 Apr 2021 15:23:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2021-02-03 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1:

ping?


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Wed, 03 Feb 2021 08:47:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2020-09-27 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1:

(1 comment)

> Patch Set 1:
>
> I'm unsure if this is right or if it even can happen (because it doesn't make 
> sense to have more than 64 trx per bts).
> @fixeria: I stumpled into it while migrating your frequency hopping patch for 
> osmo-bsc.

I think it can happen, given that we do not limit the number of channels that 
can be configured via the VTY interface.

https://gerrit.osmocom.org/c/osmo-bsc/+/20290/1/src/osmo-bsc/osmo_bsc_main.c
File src/osmo-bsc/osmo_bsc_main.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/20290/1/src/osmo-bsc/osmo_bsc_main.c@260
PS1, Line 260:  num_cell_arfcns = sizeof(ts->hopping.ma_data);
I think we should not silently truncate the list. Let's rather return an error 
and make sure that the caller would terminate the process with proper logging 
message?



--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Sun, 27 Sep 2020 17:55:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2020-09-26 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )

Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..


Patch Set 1:

I'm unsure if this is right or if it even can happen (because it doesn't make 
sense to have more than 64 trx per bts).
@fixeria: I stumpled into it while migrating your frequency hopping patch for 
osmo-bsc.


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Sat, 26 Sep 2020 23:00:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-boun...

2020-09-26 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/20290 )


Change subject: generate_ma_for_ts: check num_cell_arfcns to guarantee no 
out-of-bounds access
..

generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-bounds access

Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/20290/1

diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 20bd620..b822a05 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -256,6 +256,9 @@
num_cell_arfcns++;
}

+   if (num_cell_arfcns > sizeof(ts->hopping.ma_data) * 8)
+   num_cell_arfcns = sizeof(ts->hopping.ma_data);
+
/* pad it to octet-aligned number of bits */
ts->hopping.ma_len = OSMO_BYTES_FOR_BITS(num_cell_arfcns);
ma->cur_bit = (ts->hopping.ma_len * 8) - 1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f
Gerrit-Change-Number: 20290
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange