The vulnerability, identified as GHSA-8wxp-xxp2-rcgx, is an uncontrolled resource consumption flaw in the Volcano webhook server. The server did not enforce a size limit on incoming HTTP request bodies, making it susceptible to a denial-of-service attack. An in-cluster user with access to the webhook endpoint could send a request with an extremely large body, causing the webhook server to allocate an excessive amount of memory, eventually leading to an Out-of-Memory (OOM) kill.
The analysis of the patch commits reveals that the core of the vulnerability was in the Serve function located in pkg/webhooks/router/server.go. This function used io.ReadAll(r.Body) to read the request body without any restrictions. The fix, introduced in commit 485e0670d68fc1d53a85b2a5a4f8c4eb5c6a2cdd, involves wrapping the request body with http.MaxBytesReader. This effectively caps the amount of data that can be read from the request body, preventing the OOM condition.
The primary vulnerable function identified is router.Serve. Additionally, the anonymous handler function within router.RegisterAdmission is also flagged as it is the entry point for the request and directly calls the vulnerable function. During an exploit, both of these functions would likely appear in a runtime profile or stack trace.