Attention is currently required from: laforge, fixeria.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206 )
Change subject: hnbap: Use protocolExtensions := * in tr and omit in ts templates
......................................................................
Patch Set 3:
(1 comment)
File library/hnbap/HNBAP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206/comment/7c7e9566_da79…
PS2, Line 93: ts_HNBAP_HNBRegisterRequest
> Something is wrong here: […]
Right, thanks for noticing.
I first tried to make it work without all the copy/paste with the "template modifies" syntax, but that didn't seem to be happy about template functions.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206
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: Ic8f9afc9d74507f7d73f52cefc92ed1c2dc4b1bc
Gerrit-Change-Number: 29206
Gerrit-PatchSet: 3
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 24 Aug 2022 12:01:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, daniel.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206 )
Change subject: hnbap: Use protocolExtensions := * in tr and omit in ts templates
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
File library/hnbap/HNBAP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206/comment/9dd07386_e80f…
PS2, Line 93: ts_HNBAP_HNBRegisterRequest
Something is wrong here:
* this is a send (ts_) template, so it should be '(value)', not '(present)';
* all arguments should also be '(value)' or '(omit)', not '(present)';
* there should be no '?' nor '*' in send templates.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206
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: Ic8f9afc9d74507f7d73f52cefc92ed1c2dc4b1bc
Gerrit-Change-Number: 29206
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 24 Aug 2022 11:54:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin, dexter.
Christian Amsüss has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/29033 )
Change subject: Add new pySim.ota library, implement SIM OTA crypto
......................................................................
Patch Set 7:
(4 comments)
File pySim/ota.py:
https://gerrit.osmocom.org/c/pysim/+/29033/comment/f6c2c89c_c57bb312
PS4, Line 44: S 102 225 Table 5
: ota_status_codes = bidict({
: 0x00: 'PoR OK',
: 0x01: 'RC/CC/DS failed',
: 0x02: 'CNTR low',
: 0x03: 'CNTR high',
: 0x04: 'CNTR blocked',
: 0x05: 'Ciphering error',
: 0x06: 'Unidentified security error',
: 0x07: 'Insufficient memory',
: 0x08: 'more time',
: 0x09: 'TAR unknown',
: 0x0a: 'Insufficient security level',
: 0x0b: 'Actual Response in SMS-SUBMIT', # 31.115
: 0x0c: 'Actual Response in USSD', # 31.115
: })
> yes, that can be removed. […]
Ack
https://gerrit.osmocom.org/c/pysim/+/29033/comment/397c5293_41284fbb
PS4, Line 120: algo_auth: str, kid_idx: int, kid: bytes, cntr: int = 0):
I still think we'd have a more secure-in-use API if we removed the default cntr and added a note in the docstring along the lines of:
> Setting the cntr to a constant value (e.g. cntr=0) is only recommended in experimentation, testing (especially to obtain reproducible ciphertexts) and research. Whenever commands need to be secured against adversaries that could intercept the messages, the caller needs to ensure that the same counter value is not used twice for any key.
Thus, users in testing / research actively have to acknowledge that they do something that'd be dangerous in production, and users who ship this have an easier time finding the right place to adjust the demo code they find.
File pySim/ota.py:
https://gerrit.osmocom.org/c/pysim/+/29033/comment/66ee6149_01287e6b
PS5, Line 416: res = self.SmsResponsePacket.parse(remainder)
> I'm not sure I understand you here. […]
The bad part about an exception is that aborting would be unwarranted. If `spi['por_shall_be_ciphered']`, then decoding the remainder would yield garbage (only what's in the if-clause below, decoding the deciphered remainder yields good data).
Decoding is currently obviously rather lax, in that it even accepts the "garbage" data it currently decodes, but if that decode step got stricter, it'd be a toss-up whether the ciphertext happens to be a valid SmsResponsePacket (in which case the function can continue, and the garbage in `res` is never accessed) or it happens to be invalid (which would be no surprise), and an exception is raised about data that is neither expected to be usable nor actually used (as `res` would be overwritten with the correct result in the if-clause, if only execution got there).
File pySim/sms.py:
https://gerrit.osmocom.org/c/pysim/+/29033/comment/627e5a1d_91beacc0
PS5, Line 30: ie_c = Struct('offset'/Tell, 'iei'/Int8ub, 'length'/Int8ub, 'data'/Bytes(this.length))
> updated version pushed.
I don't see that in change set 7 yet -- I was referring to the changes in I0d95e62c1e7183a7851d1fe38df0f5133830cb1f which look like:
```
class UserDataHeader:
# a single IE in the user data header
- ie_c = Struct('offset'/Tell, 'iei'/Int8ub, 'length'/Int8ub, 'data'/Bytes(this.length))
+ ie_c = Struct('iei'/Int8ub, 'length'/Int8ub, 'value'/Bytes(this.length))
# parser for the full UDH: Length octet followed by sequence of IEs
- _construct = Struct('udhl'/Int8ub,
- # FIXME: somehow the below lambda is not working, we always only get the first IE?
- 'ies'/RepeatUntil(lambda obj,lst,ctx: ctx._io.tell() > 1+this.udhl, ie_c))
+ _construct = Struct('ies'/Prefixed(Int8ub, GreedyRange(ie_c)),
+ 'data'/GreedyBytes)
```
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29033
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I193ff4712c8503279c017b4b1324f0c3d38b9f84
Gerrit-Change-Number: 29033
Gerrit-PatchSet: 7
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 24 Aug 2022 11:53:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-MessageType: comment
Attention is currently required from: daniel.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29198 )
Change subject: hnbgw: Add test to check for duplicate hnb registrations
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29198
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: Ib20d07ffabb91dfa82c212aaa363cafc7496bba8
Gerrit-Change-Number: 29198
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 24 Aug 2022 11:44:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206
to look at the new patch set (#2).
Change subject: hnbap: Use protocolExtensions := * in tr and omit in ts templates
......................................................................
hnbap: Use protocolExtensions := * in tr and omit in ts templates
Change-Id: Ic8f9afc9d74507f7d73f52cefc92ed1c2dc4b1bc
---
M hnbgw/HNBGW_Tests.ttcn
M library/hnbap/HNBAP_Templates.ttcn
2 files changed, 62 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/29206/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29206
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: Ic8f9afc9d74507f7d73f52cefc92ed1c2dc4b1bc
Gerrit-Change-Number: 29206
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset