KerberosFlags
field has invalid size after decoding or encoding
#111
Labels
area/standard
Related to a ASN.1 standard implemented in rasn.
good first issue
Good for newcomers
help wanted
Extra attention is needed
kind/bug
Something isn't working
The
BitString
decoder and encoder both appear to truncate null bytes, resulting in invalid values for someKerberosFlags
fields (which must be at least 32 bits). For example, my Windows 10 test machine generates a TGS-REQ with a KDCOptions field0x40810000
(0x03050040810000
including the tag and length). That field decodes to a 16-bit BitString value of0x4081
. Similarly, the encoder will produce0x0303004081
from the 32-bitBitString
value, which gets rejected by the KDC. Removing the truncation on bothencode_bit_string()
anddecode_bit_string()
fixes my issue. I would try to put together a PR but I'm not sure the preferred way to handle this (ex. parameterizeBitString
with a min length, add a new type, etc.)The text was updated successfully, but these errors were encountered: