You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, during my testing, I two potential index out-of-range issues in the ASN1 APER decoding and encoding implementation. Specifically, the issues are related to unchecked array index access in two functions:
The parseAlignBits function, and the putBitString function.
These issues can potentially cause the E2T, which uses this code to decode messages, to crash. I have tested this on version 0.10.24, but it appears that the latest version still contains the same problem.
For the decoding issue in parseAlignBits, please see the attached logs:
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:828 Decoding
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:828 Decoding Rsrp
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:897 not a built in field type e2smmho.Rsrp
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:941 struct Rsrp ignoring unexported field : state
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:941 struct Rsrp ignoring unexported field : sizeCache
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:941 struct Rsrp ignoring unexported field : unknownFields
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:949 SEQUENCE int32 can be extended
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:959 optionalCount is 0
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:972 struct Rsrp ignoring unexported field : state
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:972 struct Rsrp ignoring unexported field : sizeCache
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:972 struct Rsrp ignoring unexported field : unknownFields
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:828 Decoding int32
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:128 [PER got 1 bits, byteOffset(after): 31, bitsOffset(after): 5, value: 0x1]
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:859 Decoded Value Extensive Bit: true
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:862 Indicating Value Extensive Bit: true
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:897 not a built in field type int32
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:565 Decoding INTEGER with Extensive Value
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:136 Aligning 3 bits
2023-12-19T11:21:52.511-0400 DEBUG asn1/aper aper/aper.go:128 [PER got 3 bits, byteOffset(after): 32, bitsOffset(after): 0, value: 0x2]
panic: runtime error: slice bounds out of range [:33] with capacity 32
Hello, during my testing, I two potential index out-of-range issues in the ASN1 APER decoding and encoding implementation. Specifically, the issues are related to unchecked array index access in two functions:
The parseAlignBits function, and the putBitString function.
These issues can potentially cause the E2T, which uses this code to decode messages, to crash. I have tested this on version 0.10.24, but it appears that the latest version still contains the same problem.
For the decoding issue in parseAlignBits, please see the attached logs:
And for the encoding issue in putBitString, the log is as follows:
The text was updated successfully, but these errors were encountered: