The `_nx_secure_x509_asn1_tlv_block_parse()` function parses ASN.1 TLV (tag-length-value) blocks out of DER-encoded data. It is the primitiv
위협 신호 · CVSS · EPSS · KEV
이론적 심각도 점수
예측 데이터 없음
실측 악용 기록 없음
계획된 패치 주기 내 조치(60일 이내)
CVSS 벡터 · 메트릭
CVSS 벡터 정보 없음
약점 (CWE)
상세 설명
The _nx_secure_x509_asn1_tlv_block_parse() function parses ASN.1 TLV (tag-length-value) blocks out of DER-encoded data. It is the primitive underneath all X.509 certificate parsing in NetX Secure, and therefore runs on certificates supplied by a remote peer during the TLS handshake.
The function reads the one-byte ASN.1 tag from the caller's buffer before checking that the buffer holds at least one byte. When a caller passes a remaining length of zero, the guard correctly returns NX_SECURE_X509_ASN1_LENGTH_TOO_LONG, but the read has already happened one byte past the end of the buffer.
code:
nx_secure/src/nx_secure_x509_asn1_tlv_block_parse.c
1 2 3 4UINT _nx_secure_x509_asn1_tlv_block_parse(const UCHAR *buffer, ULONG *buffer_length, USHORT *tlv_type, 5 6 USHORT *tlv_tag_class, ULONG *tlv_length, 7 const UCHAR **tlv_data, ULONG *header_length) 8 9 10{11 12 13 14UINT current_index;15 16 17 18USHORT current_tag;19 20 21 22ULONG length;23 24 25 26ULONG length_bytes;27 28 current_index = 0;29 current_tag = buffer[current_index]; /* <-- read before the bounds check */30 if (*buffer_length < 1)31 {32 return(NX_SECURE_X509_ASN1_LENGTH_TOO_LONG);33 }34 The remainder of the function is correctly ordered. The multi-byte length path is guarded by length_bytes > 4 || length_bytes > *buffer_length before its read loop, the decoded value is checked against length > *buffer_length, and the second single-byte length read follows its own *buffer_length < 1 guard. The tag read is the only load placed ahead of its check.
AI 심층 분석
공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.