CSHARP-6268Ready for Work

GSSAPI (Kerberos) authentication on Linux truncates non-ASCII usernames, passwords and service principal names

Affects driver versions 2.12.0 through 3.12.0, and current {{main}}. On Linux, the driver authenticates Kerberos (GSSAPI) through libgssapi. {{GssInputBuffer(string)}} ({{src/MongoDB.Driver/Authentication/Gssapi/Libgssapi/GssInputBuffer.cs}}) builds the GSSAPI buffer like this: GSSAPI treats {{length}} as the number of bytes to read (RFC 2744, {{gss_buffer_desc}}). Any character outside ASCII takes more than one byte in UTF-8, so the declared length is too short and the end of the string is

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue
Authentication
Labels
Tags and classification

No labels assigned.