KonduitAI / deeplearning4j

Eclipse Deeplearning4j, ND4J, DataVec and more - deep learning & linear algebra for Java/Scala with GPUs + Spark
http://deeplearning4j.konduit.ai
Apache License 2.0
11 stars 7 forks source link

[Security] Bump jetty-server from 9.4.19.v20190610 to 9.4.41.v20210516 #574

Open dependabot-preview[bot] opened 3 years ago

dependabot-preview[bot] commented 3 years ago

Bumps jetty-server from 9.4.19.v20190610 to 9.4.41.v20210516. This update includes security fixes.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

Buffer not correctly recycled in Gzip Request inflation

Impact

If GZIP request body inflation is enabled and requests from different clients are multiplexed onto a single connection and if an attacker can send a request with a body that is received entirely by not consumed by the application, then a subsequent request on the same connection will see that body prepended to it's body.

The attacker will not see any data, but may inject data into the body of the subsequent request

CVE score is 4.8 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L

Workarounds

The problem can be worked around by either:

  • Disabling compressed request body inflation by GzipHandler.
  • By always fully consuming the request content before sending a response.
  • By adding a Connection: close to any response where the servlet does not fully consume request content.

Affected versions: >= 9.4.0, <= 9.4.34

Sourced from The GitHub Security Advisory Database.

DOS vulnerability for Quoted Quality CSV headers

Impact

When Jetty handles a request containing request headers with a large number of “quality” (i.e. q) parameters (such as what are seen on the Accept, Accept-Encoding, and Accept-Language request headers), the server may enter a denial of service (DoS) state due to high CPU usage while sorting the list of values based on their quality values. A single request can easily consume minutes of CPU time before it is even dispatched to the application.

The only features within Jetty that can trigger this behavior are:

  • Default Error Handling - the Accept request header with the QuotedQualityCSV is used to determine what kind of content to send back to the client (html, text, json, xml, etc)
  • StatisticsServlet - uses the Accept request header with the QuotedQualityCSV to determine what kind of content to send back to the client (xml, json, text, html, etc)
  • HttpServletRequest.getLocale() - uses the Accept-Language request header with the QuotedQualityCSV to determine which “preferred” language is returned on this call.
  • HttpservletRequest.getLocales() - is similar to the above, but returns an ordered list of locales based on the quality values on the Accept-Language request header.
  • DefaultServlet - uses the Accept-Encoding request header with the QuotedQualityCSV to determine which kind of pre-compressed content should be sent back for static content (content that is not matched against a url-pattern in your web app)

Versions

QuotedQualityCSV was introduced to Jetty 9.3.9.v20160517 and the bug that introduced the vulnerability was in 9.4.6.v20170531.

Currently, known vulnerable versions include:

  • 9.4.6.v20170531 thru to 9.4.36.v20210114
  • 10.0.0
  • 11.0.0

... (truncated)

Affected versions: >= 9.4.6, < 9.4.37

Sourced from The GitHub Security Advisory Database.

SessionListener can prevent a session from being invalidated breaking logout

Impact

If an exception is thrown from the SessionListener#sessionDestroyed() method, then the session ID is not invalidated in the session ID manager. On deployments with clustered sessions and multiple contexts this can result in a session not being invalidated. This can result in an application used on a shared computer being left logged in.

There is no known path for an attacker to induce such an exception to be thrown, thus they must rely on an application to throw such an exception. The OP has also identified that during the call to sessionDestroyed, the getLastAccessedTime() throws an IllegalStateException, which potentially contrary to the servlet spec, so applications calling this method may always throw and fail to log out. If such an application was only tested on a non clustered test environment, then it may be deployed on a clustered environment with multiple contexts and fail to log out.

Workarounds

The application should catch all Throwables within their SessionListener#sessionDestroyed() implementations.

Affected versions: <= 9.4.40

Release notes

Sourced from jetty-server's releases.

9.4.41.v20210516

Changelog

  • This release resolves CVE-2021-28169
  • #6099 Cipher preference may break SNI if certificates have different key types
  • #6186 Add Null Protection on Log / Logger
  • #6205 OpenIdAuthenticator may use incorrect redirect
  • #6208 HTTP/2 max local stream count exceeded
  • #6227 Better resolve race between AsyncListener.onTimeout and AsyncContext.dispatch
  • #6254 Total timeout not enforced for queued requests
  • #6263 Review URI encoding in ConcatServlet & WelcomeFilter
  • #6277 Better handle exceptions thrown from session destroy listener
  • #6280 Copy ServletHolder class/instance properly during startWebapp

9.4.40.v20210413

Notable Bug Fixes

Users of GzipHandler should upgrade. (#6168) Users of SSL/TLS on the jetty-server or jetty-client should upgrade. (#6082)

Changelog

  • #6168 - Improve handling of unconsumed content
  • #6148 - Jetty start.jar always reports jetty.tag.version as master
  • #6105 - HttpConnection.getBytesIn() incorrect for requests with chunked content
  • #6082 - SslConnection compacting

9.4.39.v20210325

Changelog

:warning: Important Security related Changes

Other Changes

  • #6034 - SslContextFactory may select a wildcard certificate during SNI selection when a more specific SSL certificate is present
  • #6050 - Websocket: NotUtf8Exception after upgrade 9.4.35 -> 9.4.36 or newer
  • #6052 - Cleanup TypeUtil and ModuleLocation to allow jetty-client/hybrid to work on Android
  • #6063 - Allow override of hazelcast version when using module
  • #6085 - Jetty keeps Sessions in use after "Duplicate valid session cookies" Message

9.4.38.v20210224

Changelog

  • #6001 - Ambiguous URI legacy compliance mode

... (truncated)

Commits
  • 98607f9 Updating to version 9.4.41.v20210516
  • 087f486 Issue #6277 Better handling of exceptions thrown in sessionDestroyed (#6278) ...
  • edcaf70 Copy ServletHolder class/instance properly during startWebapp (#6214)
  • 1c05b0b Fixes #6263 - Review URI encoding in ConcatServlet & WelcomeFilter.
  • 9cb9343 Issue #6205 - Fix serialization issues in OpenIdAuthenticator
  • 2e7f5eb Issue #6205 - Fix issues with OpenID redirecting to wrong URI (#6211)
  • 88ac104 Issue #6254 - Total timeout not enforced for queued requests.
  • da50e06 Fixes #6254 - Total timeout not enforced for queued requests.
  • 5f23689 Issue #6254 - Total timeout not enforced for queued requests.
  • 003c313 upgrade h2spec-maven-plugin 1.0.5 (#6247)
  • Additional commits viewable in compare view


Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Note: This repo was added to Dependabot recently, so you'll receive a maximum of 1 PRs for your first few update runs. Once an update run creates fewer than 1 PRs we'll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)