The vulnerability, identified as GHSA-7j6w-vvw2-5f9c, allows for the creation of un-accessible tokens in OpenBao, leading to resource exhaustion. The root cause is within the Kerberos authentication method's GET handler, specifically the backend.pathLoginGet function in builtin/credential/kerberos/path_login.go. This function would incorrectly return a logical.Auth object along with an error message during the initial phase of Kerberos authentication. The core request handling logic in Core.handleRequest and Core.handleLoginRequest would then process this logical.Auth object and create a token, but since an error was also returned, the token's details were never sent to the client, causing it to be orphaned.
The patch addresses this issue comprehensively. First, it corrects the behavior of backend.pathLoginGet by removing the erroneous logical.Auth object from its response. Second, it introduces defensive checks in the core request handlers (Core.handleRequest and Core.handleLoginRequest) to explicitly prevent token creation if a backend returns both an Auth object and an error. This ensures that even if other authentication backends have similar incorrect implementations, the same vulnerability will not manifest.