Bug ID 683683: ASN1::encode returns wrong binary data

Last Modified: May 14, 2019

Bug Tracker

Affected Product:  See more info
BIG-IP All(all modules)

Known Affected Versions:
12.1.0, 12.1.0 HF1, 12.1.0 HF2, 12.1.1, 12.1.1 HF1, 12.1.1 HF2, 12.1.2, 12.1.2 HF1, 12.1.2 HF2, 12.1.3, 12.1.3.1

Fixed In:
14.0.0, 12.1.3.2

Opened: Sep 15, 2017
Severity: 3-Major

Symptoms

ASN1::encode returns incorrect data for certain integer values. For example, for integer 49280, ASN1::encode returns 02030000.

Impact

The returned binary is wrong.

Conditions

The problem happens in an implicit UTF encoding/decoding, and it is not obvious what data triggers the error. This is because it implicitly converts the Tcl object type from byte array to string and later back to byte array, but because of the UTF de-coding algorithm, certain bytes get changed.

Workaround

Use binary scan for the value that is incorrectly encoded by the command.

Fix Information

ASN1::encode ENCODE mode now works so that it avoids the implicit type-conversion byte array to string back to byte array, which gets the original byte array changed during UTF-8 decoding.

Behavior Change