CVE-2024-41110
Description
Moby is an open-source project created by Docker for software containerization. A security vulnerability has been detected in certain versions of Docker Engine, which could allow an attacker to bypass authorization plugins (AuthZ) under specific circumstances. The base likelihood of this being exploited is low.
Using a specially-crafted API request, an Engine API client could make the daemon forward the request or response to an authorization plugin without the body. In certain circumstances, the authorization plugin may allow a request which it would have otherwise denied if the body had been forwarded to it.
A security issue was discovered In 2018, where an attacker could bypass AuthZ plugins using a specially crafted API request. This could lead to unauthorized actions, including privilege escalation. Although this issue was fixed in Docker Engine v18.09.1 in January 2019, the fix was not carried forward to later major versions, resulting in a regression. Anyone who depends on authorization plugins that introspect the request and/or response body to make access control decisions is potentially impacted.
Docker EE v19.03.x and all versions of Mirantis Container Runtime are not vulnerable.
docker-ce v27.1.1 containes patches to fix the vulnerability. Patches have also been merged into the master, 19.03, 20.0, 23.0, 24.0, 25.0, 26.0, and 26.1 release branches. If one is unable to upgrade immediately, avoid using AuthZ plugins and/or restrict access to the Docker API to trusted parties, following the principle of least privilege.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/docker/dockerGo | >= 19.03.0, < 23.0.15 | 23.0.15 |
github.com/docker/dockerGo | >= 26.0.0, < 26.1.5 | 26.1.5 |
github.com/docker/dockerGo | >= 27.0.0, < 27.1.1 | 27.1.1 |
github.com/docker/dockerGo | >= 24.0.0, < 25.0.6 | 25.0.6 |
Patches
1065cc597cea28Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -8,6 +8,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/containerd/log" @@ -53,10 +55,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -109,7 +124,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { log.G(context.TODO()).Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -147,10 +161,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -174,8 +174,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -219,15 +219,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
a31260625655Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -8,6 +8,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/containerd/log" @@ -53,10 +55,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -109,7 +124,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { log.G(context.TODO()).Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -147,10 +161,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -174,8 +174,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -219,15 +219,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
ae2b3666c517Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -7,6 +7,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/docker/docker/pkg/ioutils" @@ -52,10 +54,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -108,7 +123,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { logrus.Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -146,10 +160,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -175,8 +175,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -220,15 +220,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
ae160b4edddbMerge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -7,6 +7,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/docker/docker/pkg/ioutils" @@ -52,10 +54,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -108,7 +123,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { logrus.Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -146,10 +160,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -174,8 +174,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -219,15 +219,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
42f40b1d6dd7Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -7,6 +7,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/docker/docker/pkg/ioutils" @@ -52,10 +54,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -108,7 +123,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { logrus.Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -146,10 +160,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -175,8 +175,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -220,15 +220,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
411e817ddf71Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -8,6 +8,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/containerd/log" @@ -53,10 +55,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -109,7 +124,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { log.G(context.TODO()).Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -147,10 +161,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -174,8 +174,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -219,15 +219,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
852759a7df45Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -7,6 +7,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/docker/docker/pkg/ioutils" @@ -52,10 +54,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -108,7 +123,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { logrus.Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -146,10 +160,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -175,8 +175,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -220,15 +220,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
cc13f9525111Merge commit from fork
2 files changed · +115 −7
pkg/authorization/authz.go+34 −4 modified@@ -8,6 +8,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/containerd/log" @@ -53,10 +55,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + // RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { + return true + } + for _, v := range r.TransferEncoding { + if strings.EqualFold(v, "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -109,7 +124,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { log.G(context.TODO()).Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -147,10 +161,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+81 −3 modified@@ -174,8 +174,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -219,15 +219,93 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
a79fabbfe841If url includes scheme, urlPath will drop hostname, which would not match the auth check
2 files changed · +38 −3
pkg/authorization/authz.go+3 −3 modified@@ -56,11 +56,11 @@ type Ctx struct { func isChunked(r *http.Request) bool { //RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked - if strings.ToLower(r.Header.Get("Transfer-Encoding")) == "chunked" { + if strings.EqualFold(r.Header.Get("Transfer-Encoding"), "chunked") { return true } for _, v := range r.TransferEncoding { - if 0 == strings.Compare(strings.ToLower(v), "chunked") { + if strings.EqualFold(v, "chunked") { return true } } @@ -162,7 +162,7 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { func isAuthEndpoint(urlPath string) (bool, error) { // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) - matched, err := regexp.MatchString(`^[^\/]+\/(v\d[\d\.]*\/)?auth.*`, urlPath) + matched, err := regexp.MatchString(`^[^\/]*\/(v\d[\d\.]*\/)?auth.*`, urlPath) if err != nil { return false, err }
pkg/authorization/authz_unix_test.go+35 −0 modified@@ -259,6 +259,41 @@ func TestSendBody(t *testing.T) { contentType: "application/json;charset=UTF8", expected: false, }, + { + url: "www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "https://www.nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "http://nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "http://www.nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "https://www.nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, } )
fc274cd2ff4cAuthz plugin security fixes for 0-length content and path validation Signed-off-by: Jameson Hyde <jameson.hyde@docker.com>
2 files changed · +80 −7
pkg/authorization/authz.go+34 −4 modified@@ -7,6 +7,8 @@ import ( "io" "mime" "net/http" + "net/url" + "regexp" "strings" "github.com/docker/docker/pkg/ioutils" @@ -52,10 +54,23 @@ type Ctx struct { authReq *Request } +func isChunked(r *http.Request) bool { + //RFC 7230 specifies that content length is to be ignored if Transfer-Encoding is chunked + if strings.ToLower(r.Header.Get("Transfer-Encoding")) == "chunked" { + return true + } + for _, v := range r.TransferEncoding { + if 0 == strings.Compare(strings.ToLower(v), "chunked") { + return true + } + } + return false +} + // AuthZRequest authorized the request to the docker daemon using authZ plugins func (ctx *Ctx) AuthZRequest(w http.ResponseWriter, r *http.Request) error { var body []byte - if sendBody(ctx.requestURI, r.Header) && r.ContentLength > 0 && r.ContentLength < maxBodySize { + if sendBody(ctx.requestURI, r.Header) && (r.ContentLength > 0 || isChunked(r)) && r.ContentLength < maxBodySize { var err error body, r.Body, err = drainBody(r.Body) if err != nil { @@ -108,7 +123,6 @@ func (ctx *Ctx) AuthZResponse(rm ResponseModifier, r *http.Request) error { if sendBody(ctx.requestURI, rm.Header()) { ctx.authReq.ResponseBody = rm.RawBody() } - for _, plugin := range ctx.plugins { logrus.Debugf("AuthZ response using plugin %s", plugin.Name()) @@ -146,10 +160,26 @@ func drainBody(body io.ReadCloser) ([]byte, io.ReadCloser, error) { return nil, newBody, err } +func isAuthEndpoint(urlPath string) (bool, error) { + // eg www.test.com/v1.24/auth/optional?optional1=something&optional2=something (version optional) + matched, err := regexp.MatchString(`^[^\/]+\/(v\d[\d\.]*\/)?auth.*`, urlPath) + if err != nil { + return false, err + } + return matched, nil +} + // sendBody returns true when request/response body should be sent to AuthZPlugin -func sendBody(url string, header http.Header) bool { +func sendBody(inURL string, header http.Header) bool { + u, err := url.Parse(inURL) + // Assume no if the URL cannot be parsed - an empty request will still be forwarded to the plugin and should be rejected + if err != nil { + return false + } + // Skip body for auth endpoint - if strings.HasSuffix(url, "/auth") { + isAuth, err := isAuthEndpoint(u.Path) + if isAuth || err != nil { return false }
pkg/authorization/authz_unix_test.go+46 −3 modified@@ -174,8 +174,8 @@ func TestDrainBody(t *testing.T) { func TestSendBody(t *testing.T) { var ( - url = "nothing.com" testcases = []struct { + url string contentType string expected bool }{ @@ -219,15 +219,58 @@ func TestSendBody(t *testing.T) { contentType: "", expected: false, }, + { + url: "nothing.com/auth", + contentType: "", + expected: false, + }, + { + url: "nothing.com/auth", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/auth?p1=test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/test?p1=/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/something/auth", + contentType: "application/json;charset=UTF8", + expected: true, + }, + { + url: "nothing.com/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1.24/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, + { + url: "nothing.com/v1/auth/test", + contentType: "application/json;charset=UTF8", + expected: false, + }, } ) for _, testcase := range testcases { header := http.Header{} header.Set("Content-Type", testcase.contentType) + if testcase.url == "" { + testcase.url = "nothing.com" + } - if b := sendBody(url, header); b != testcase.expected { - t.Fatalf("Unexpected Content-Type; Expected: %t, Actual: %t", testcase.expected, b) + if b := sendBody(testcase.url, header); b != testcase.expected { + t.Fatalf("sendBody failed: url: %s, content-type: %s; Expected: %t, Actual: %t", testcase.url, testcase.contentType, testcase.expected, b) } } }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
16- github.com/advisories/GHSA-v23v-6jw2-98fqghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-41110ghsaADVISORY
- github.com/moby/moby/commit/411e817ddf710ff8e08fa193da80cb78af708191nvdWEB
- github.com/moby/moby/commit/42f40b1d6dd7562342f832b9cd2adf9e668eeb76nvdWEB
- github.com/moby/moby/commit/65cc597cea28cdc25bea3b8a86384b4251872919nvdWEB
- github.com/moby/moby/commit/852759a7df454cbf88db4e954c919becd48faa9bnvdWEB
- github.com/moby/moby/commit/a31260625655cff9ae226b51757915e275e304b0nvdWEB
- github.com/moby/moby/commit/a79fabbfe84117696a19671f4aa88b82d0f64fc1nvdWEB
- github.com/moby/moby/commit/ae160b4edddb72ef4bd71f66b975a1a1cc434f00nvdWEB
- github.com/moby/moby/commit/ae2b3666c517c96cbc2adf1af5591a6b00d4ec0fnvdWEB
- github.com/moby/moby/commit/cc13f952511154a2866bddbb7dddebfe9e83b801nvdWEB
- github.com/moby/moby/commit/fc274cd2ff4cf3b48c91697fb327dd1fb95588fbnvdWEB
- github.com/moby/moby/security/advisories/GHSA-v23v-6jw2-98fqnvdWEB
- www.docker.com/blog/docker-security-advisory-docker-engine-authz-pluginnvdWEB
- lists.debian.org/debian-lts-announce/2024/10/msg00009.htmlnvd
- security.netapp.com/advisory/ntap-20240802-0001/nvd
News mentions
0No linked articles in our index yet.