smsutil: Validate the length of the address field
PATCH v2 1/1 smsutil: Validate the length of the address field
This addresses CVE-2023-4233.
--- src/smsutil.c | 4 ++++ 1 file changed, 4 insertions(+)
src/smsutil.c +4 -0
@@ -627,6 +627,10 @@ gboolean sms_decode_address_field(const unsigned char *pdu, int len,if (!next_octet (pdu, len, offset, &addr_len))return FALSE; +/* According to 23.040 9.1.2.5 Address-Length must not exceed 20 */ +if (addr_len >20 ) +return FALSE; +if (sc && addr_len ==0 ) { out->address[0 ] ='\0' ;return TRUE;
Signature · 1 line
2.34.1
PATCH v3 1/1 smsutil: Validate the length of the address field
This addresses CVE-2023-4233.
---
v1 -> v2: Validate Address-Length instead of comparing with mem size. v2 -> v3: Remove extra space
src/smsutil.c | 4 ++++ 1 file changed, 4 insertions(+)
src/smsutil.c +4 -0
@@ -627,6 +627,10 @@ gboolean sms_decode_address_field(const unsigned char *pdu, int len,if (!next_octet (pdu, len, offset, &addr_len))return FALSE; +/* According to 23.040 9.1.2.5 Address-Length must not exceed 20 */ +if (addr_len >20 ) +return FALSE; +if (sc && addr_len ==0 ) { out->address[0 ] ='\0' ;return TRUE;
Signature · 1 line
2.34.1
Denis Kenzior
AppliedHi Denis,
Quoted 8 lines · Denis Grigorev
This addresses CVE-2023-4233.
---
v1 -> v2: Validate Address-Length instead of comparing with mem size. v2 -> v3: Remove extra spacesrc/smsutil.c | 4 ++++ 1 file changed, 4 insertions(+)
Applied, thanks.
Regards,
-Denis