Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency puma to v4 [security] - abandoned #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Feb 1, 2021

Mend Renovate

This PR contains the following updates:

Package Update Change
puma major "~> 3.7" -> "~> 4.0"

GitHub Vulnerability Alerts

CVE-2021-29509

This vulnerability is related to CVE-2019-16770.

Impact

The fix for CVE-2019-16770 was incomplete. The original fix only protected existing connections that had already been accepted from having their requests starved by greedy persistent-connections saturating all threads in the same process. However, new connections may still be starved by greedy persistent-connections saturating all threads in all processes in the cluster.

A puma server which received more concurrent keep-alive connections than the server had threads in its threadpool would service only a subset of connections, denying service to the unserved connections.

Patches

This problem has been fixed in puma 4.3.8 and 5.3.1.

Workarounds

Setting queue_requests false also fixes the issue. This is not advised when using puma without a reverse proxy, such as nginx or apache, because you will open yourself to slow client attacks (e.g. slowloris).

The fix is very small. A git patch is available here for those using unsupported versions of Puma.

For more information

If you have any questions or comments about this advisory:

Acknowledgements

Thank you to @​MSP-Greg, @​wjordan and @​evanphx for their review on this issue.

Thank you to @​ioquatix for providing a modified fork of wrk which made debugging this issue much easier.

CVE-2021-41136

Impact

Prior to puma version 5.5.0, using puma with a proxy which forwards LF characters as line endings could allow HTTP request smuggling. A client could smuggle a request through a proxy, causing the proxy to send a response back to another unknown client.

This behavior (forwarding LF characters as line endings) is very uncommon amongst proxy servers, so we have graded the impact here as "low". Puma is only aware of a single proxy server which has this behavior.

If the proxy uses persistent connections and the client adds another request in via HTTP pipelining, the proxy may mistake it as the first request's body. Puma, however, would see it as two requests, and when processing the second request, send back a response that the proxy does not expect. If the proxy has reused the persistent connection to Puma to send another request for a different client, the second response from the first client will be sent to the second client.

Patches

This vulnerability was patched in Puma 5.5.1 and 4.3.9.

Workarounds

This vulnerability only affects Puma installations without any proxy in front.

Use a proxy which does not forward LF characters as line endings.

Proxies which do not forward LF characters as line endings:

  • Nginx
  • Apache (>2.4.25)
  • Haproxy
  • Caddy
  • Traefik

Possible Breakage

If you are dealing with legacy clients that want to send LF as a line ending in an HTTP header, this will cause those clients to receive a 400 error.

References

For more information

If you have any questions or comments about this advisory:

CVE-2022-23634

Impact

Prior to puma version 5.6.2, puma may not always call close on the response body. Rails, prior to version 7.0.2.2, depended on the response body being closed in order for its CurrentAttributes implementation to work correctly.

From Rails:

Under certain circumstances response bodies will not be closed, for example a bug in a webserver[1] or a bug in a Rack middleware. In the event a response is not notified of a close, ActionDispatch::Executor will not know to reset thread local state for the next request. This can lead to data being leaked to subsequent requests, especially when interacting with ActiveSupport::CurrentAttributes.

The combination of these two behaviors (Puma not closing the body + Rails' Executor implementation) causes information leakage.

Patches

This problem is fixed in Puma versions 5.6.2 and 4.3.11.

This problem is fixed in Rails versions 7.02.2, 6.1.4.6, 6.0.4.6, and 5.2.6.2.

See:
GHSA-wh98-p28r-vrc9
for details about the rails vulnerability

Upgrading to a patched Rails or Puma version fixes the vulnerability.

Workarounds

Upgrade to Rails versions 7.02.2, 6.1.4.6, 6.0.4.6, and 5.2.6.2.

The Rails CVE includes a middleware that can be used instead.

References

For more information

If you have any questions or comments about this advisory:

CVE-2022-24790

When using Puma behind a proxy that does not properly validate that the incoming HTTP request matches the RFC7230 standard, Puma and the frontend proxy may disagree on where a request starts and ends. This would allow requests to be smuggled via the front-end proxy to Puma.

The following vulnerabilities are addressed by this advisory:

  • Lenient parsing of Transfer-Encoding headers, when unsupported encodings should be rejected and the final encoding must be chunked.
  • Lenient parsing of malformed Content-Length headers and chunk sizes, when only digits and hex digits should be allowed.
  • Lenient parsing of duplicate Content-Length headers, when they should be rejected.
  • Lenient parsing of the ending of chunked segments, when they should end with \r\n.

The vulnerability has been fixed in 5.6.4 and 4.3.12. When deploying a proxy in front of Puma, turning on any and all functionality to make sure that the request matches the RFC7230 standard.

These proxy servers are known to have "good" behavior re: this standard and upgrading Puma may not be necessary. Users are encouraged to validate for themselves.

  • Nginx (latest)
  • Apache (latest)
  • Haproxy 2.5+
  • Caddy (latest)
  • Traefik (latest)

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate
Copy link
Author

renovate bot commented Apr 26, 2021

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻️ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you check the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Gemfile.lock
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]
Successfully installed bundler-1.16.1
1 gem installed
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies......
Your bundle is locked to mimemagic (0.3.2), but that version could not be found
in any of the sources listed in your Gemfile. If you haven't changed sources,
that means the author of mimemagic (0.3.2) has removed it. You'll need to update
your bundle to a different version of mimemagic (0.3.2) that hasn't been removed
in order to install.


@renovate
Copy link
Author

renovate bot commented May 9, 2021

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻️ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you check the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Gemfile.lock
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]
Successfully installed bundler-1.16.1
1 gem installed
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies......
Your bundle is locked to mimemagic (0.3.2), but that version could not be found
in any of the sources listed in your Gemfile. If you haven't changed sources,
that means the author of mimemagic (0.3.2) has removed it. You'll need to update
your bundle to a different version of mimemagic (0.3.2) that hasn't been removed
in order to install.


@renovate renovate bot force-pushed the renovate/rubygems-puma-vulnerability branch from 35fe23e to 06cf288 Compare June 6, 2021 19:12
@renovate renovate bot changed the title chore(deps): update dependency puma to v3.12.4 [security] chore(deps): update dependency puma to v4 [security] Jun 6, 2021
@renovate
Copy link
Author

renovate bot commented Jun 6, 2021

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Gemfile.lock
installing v2 tool ruby v3.2.1
linking tool ruby v3.2.1
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux]
gem 3.4.6
RubyGems Environment:
  - RUBYGEMS VERSION: 3.4.6
  - RUBY VERSION: 3.2.1 (2023-02-08 patchlevel 31) [x86_64-linux]
  - INSTALLATION DIRECTORY: /tmp/renovate-cache/others/bundler
  - USER INSTALLATION DIRECTORY: /home/ubuntu/.local/share/gem/ruby/3.2.0
  - RUBY EXECUTABLE: /opt/buildpack/tools/ruby/3.2.1/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /tmp/renovate-cache/others/bundler/bin
  - SPEC CACHE DIRECTORY: /home/ubuntu/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/ruby/3.2.1/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-linux
  - GEM PATHS:
     - /tmp/renovate-cache/others/bundler
     - /home/ubuntu/.local/share/gem/ruby/3.2.0
     - /opt/buildpack/tools/ruby/3.2.1/lib/ruby/gems/3.2.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--bindir /home/ubuntu/bin --no-document"
     - :benchmark => false
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/ubuntu/.cargo/bin
     - /home/ubuntu/.local/bin
     - /go/bin
     - /home/ubuntu/bin
     - /home/ubuntu/.cargo/bin
     - /home/ubuntu/.local/bin
     - /go/bin
     - /home/ubuntu/bin
     - /home/ubuntu/.cargo/bin
     - /home/ubuntu/.local/bin
     - /go/bin
     - /home/ubuntu/bin
     - /home/ubuntu/bin
     - /home/ubuntu/.cargo/bin
     - /home/ubuntu/.local/bin
     - /go/bin
     - /home/ubuntu/bin
     - /home/ubuntu/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
Installed v2 /usr/local/buildpack/tools/v2/ruby.sh in 2 seconds
installing v2 tool bundler v1.16.1
linking tool bundler v1.16.1

/opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:266:in `search_up': undefined method `untaint' for "/mnt/renovate/gh/cheezenaan-sandbox/sample_app_rev4":String (NoMethodError)

      current  = File.expand_path(SharedHelpers.pwd).untaint
                                                    ^^^^^^^^
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:253:in `find_file'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:245:in `find_gemfile'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:27:in `root'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler.rb:218:in `root'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler.rb:230:in `app_config_path'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler.rb:257:in `settings'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/env.rb:20:in `report'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:96:in `request_issue_report_for'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:46:in `log_error'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:126:in `rescue in with_friendly_errors'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundler:4:in `load'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundler:4:in `<top (required)>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/bin/bundler:25:in `load'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/bin/bundler:25:in `<main>'
/opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:266:in `search_up': undefined method `untaint' for "/mnt/renovate/gh/cheezenaan-sandbox/sample_app_rev4":String (NoMethodError)

      current  = File.expand_path(SharedHelpers.pwd).untaint
                                                    ^^^^^^^^
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:253:in `find_file'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:245:in `find_gemfile'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/shared_helpers.rb:27:in `root'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler.rb:218:in `root'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler.rb:230:in `app_config_path'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler.rb:257:in `settings'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/feature_flag.rb:21:in `block in settings_method'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/cli.rb:97:in `<class:CLI>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/cli.rb:7:in `<module:Bundler>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/cli.rb:6:in `<top (required)>'
	from <internal:/opt/buildpack/tools/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from <internal:/opt/buildpack/tools/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundle:23:in `block in <top (required)>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundler:4:in `load'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/gems/bundler-1.16.1/exe/bundler:4:in `<top (required)>'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/bin/bundler:25:in `load'
	from /opt/buildpack/tools/bundler/1.16.1/3.2/bin/bundler:25:in `<main>'

@renovate
Copy link
Author

renovate bot commented Mar 24, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@renovate renovate bot changed the title chore(deps): update dependency puma to v4 [security] chore(deps): update dependency puma to v4 [security] - abandoned Oct 25, 2023
@renovate
Copy link
Author

renovate bot commented Oct 25, 2023

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants