Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-rack-2.2 for openSUSE:Factory checked in at 2026-11-24 18:06:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rack-2.2 (Old) and /work/SRC/openSUSE:Factory/.rubygem-rack-2.2.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rack-2.2" Tue Nov 24 18:06:56 2026 rev:22 rq:1400233 version:2.2.25 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rack-2.2/rubygem-rack-2.2.changes 2026-04-08 17:17:56.625382036 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-rack-2.2.new.1340718/rubygem-rack-2.2.changes 2026-11-24 18:06:59.032453928 +0100 @@ -1,0 +2,9 @@ +Mon Nov 23 15:28:32 UTC 2026 - Dario Leidi <[email protected]> + +- Update to version 2.2.25 + + * [CVE-2026-125110] Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch + * [CVE-2026-125108] Multipart boundary guard skips a leading empty or quoted `boundary` parameter, allowing parser differentials and WAF bypass + * [CVE-2026-125111] Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion. + +------------------------------------------------------------------- Old: ---- rack-2.2.23.gem New: ---- rack-2.2.25.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rack-2.2.spec ++++++ --- /var/tmp/diff_new_pack.KwbKRk/_old 2026-11-24 18:07:00.065497698 +0100 +++ /var/tmp/diff_new_pack.KwbKRk/_new 2026-11-24 18:07:00.074498080 +0100 @@ -1,6 +1,7 @@ # # spec file for package rubygem-rack-2.2 # +# Copyright (c) 2026 SUSE LLC # Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties @@ -24,7 +25,7 @@ # Name: rubygem-rack-2.2 -Version: 2.2.23 +Version: 2.2.25 Release: 0 %define mod_name rack %define mod_full_name %{mod_name}-%{version} ++++++ rack-2.2.23.gem -> rack-2.2.25.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 1980-01-02 01:00:00.000000000 +0100 +++ new/CHANGELOG.md 1980-01-02 01:00:00.000000000 +0100 @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/). +## [2.2.25] - 2026-10-30 + +### Security + +- [GHSA-5v64-555j-wjxm](https://github.com/advisories/GHSA-5v64-555j-wjxm) Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion. +- [GHSA-wvg4-6p58-3gh3](https://github.com/advisories/GHSA-wvg4-6p58-3gh3) `Rack::Static` header rules were matched against an unnormalized path, allowing dot segments to bypass them. +- [GHSA-p8x9-v4hv-2w4g](https://github.com/advisories/GHSA-p8x9-v4hv-2w4g) Multipart requests with more than one `boundary` parameter were accepted when the first value was empty or began with a quote, semicolon, or comma, bypassing the guard added for CVE-2026-26961. + +### Fixed + +- Multipart parser: scan boundary lines with a literal newline search instead of a backtracking regexp, which allocated tens of megabytes per scan for long lines and made the scan buffer fix above ineffective on this series. + +## [2.2.24] - 2026-08-13 + +### Security + +- [CVE-2026-26962](https://github.com/advisories/GHSA-rx22-g9mx-qrhv) Improper unfolding of folded multipart headers preserves CRLF in parsed parameter values. + ## [2.2.23] - 2026-04-01 ### Security Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rack/multipart/parser.rb new/lib/rack/multipart/parser.rb --- old/lib/rack/multipart/parser.rb 1980-01-02 01:00:00.000000000 +0100 +++ new/lib/rack/multipart/parser.rb 1980-01-02 01:00:00.000000000 +0100 @@ -20,10 +20,17 @@ BOUNDARY_REGEX = /\A([^\n]*(?:\n|\Z))/ + LINE_END = /\n/ + private_constant :LINE_END + BOUNDARY_START_LIMIT = 16 * 1024 private_constant :BOUNDARY_START_LIMIT MIME_HEADER_BYTESIZE_LIMIT = 64 * 1024 + + OBS_UNFOLD = /\r\n([ \t])/ + + private_constant :OBS_UNFOLD private_constant :MIME_HEADER_BYTESIZE_LIMIT env_int = lambda do |key, val| @@ -89,7 +96,11 @@ unless data[1].empty? raise EOFError, "whitespace between boundary parameter name and equal sign" end - if data.post_match =~ /boundary\s*=/i + # Count across the whole header rather than only after the match: the + # lazy prefix in MULTIPART can skip a first boundary parameter whose + # value is empty or starts with a quote, semicolon, or comma. Also + # count RFC 2231 boundary* parameters, which some parsers prefer. + if content_type.scan(/boundary(?:\*\d*\*?)?\s*=/i).size > 1 raise EOFError, "multiple boundary parameters found in multipart content type" end @@ -310,14 +321,17 @@ def handle_mime_head if @sbuf.scan_until(@head_regex) head = @sbuf[1] - content_type = head[MULTIPART_CONTENT_TYPE, 1] - if name = head[MULTIPART_CONTENT_DISPOSITION, 1] + # Implement OBS unfolding (RFC 5322 Section 2.2.3). Done on a copy + # because content type, disposition and filename are extracted by regex. + unfolded_head = head.gsub(OBS_UNFOLD, '\\1') + content_type = unfolded_head[MULTIPART_CONTENT_TYPE, 1] + if name = unfolded_head[MULTIPART_CONTENT_DISPOSITION, 1] name = Rack::Auth::Digest::Params::dequote(name) else - name = head[MULTIPART_CONTENT_ID, 1] + name = unfolded_head[MULTIPART_CONTENT_ID, 1] end - filename = get_filename(head) + filename = get_filename(unfolded_head) if name.nil? || name.empty? name = filename || "#{content_type || TEXT_PLAIN}[]".dup @@ -339,6 +353,7 @@ # buffering. Note that the actual limit is the higher of 64KB and the buffer size (1MB by default) raise EOFError, "multipart mime part header too large" if @sbuf.rest.bytesize > MIME_HEADER_BYTESIZE_LIMIT + @sbuf.string = @sbuf.rest return :want_read end end @@ -359,8 +374,8 @@ update_retained_size(body.bytesize) if @body_retained @collector.on_mime_body @mime_index, body @sbuf.pos += delta - @sbuf.string = @sbuf.rest end + @sbuf.string = @sbuf.rest :want_read end end @@ -379,7 +394,7 @@ # end of the boundary. If we don't find the start or end of the # boundary, clear the buffer and return nil. def consume_boundary - while read_buffer = @sbuf.scan_until(BOUNDARY_REGEX) + while read_buffer = scan_line case read_buffer.strip when full_boundary then return :BOUNDARY when @end_boundary then return :END_BOUNDARY @@ -388,6 +403,21 @@ end end + # Return the next line of the buffer including its trailing "\n", or the + # rest of the buffer if it contains no "\n", and advance past it. This is + # equivalent to `@sbuf.scan_until(BOUNDARY_REGEX)`, but searching for the + # "\n" directly avoids the regexp engine's backtracking stack, which grows + # by one entry per byte matched by `[^\n]*` (tens of MB for a 1 MB line). + def scan_line + if line = @sbuf.scan_until(LINE_END) + line + else + line = @sbuf.rest + @sbuf.terminate + line + end + end + def get_filename(head) filename = nil case head diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rack/static.rb new/lib/rack/static.rb --- old/lib/rack/static.rb 1980-01-02 01:00:00.000000000 +0100 +++ new/lib/rack/static.rb 1980-01-02 01:00:00.000000000 +0100 @@ -168,7 +168,7 @@ # Convert HTTP header rules to HTTP headers def applicable_rules(path) - path = ::Rack::Utils.unescape_path(path) + path = ::Rack::Utils.clean_path_info(::Rack::Utils.unescape_path(path)) @header_rules.find_all do |rule, new_headers| case rule diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rack/version.rb new/lib/rack/version.rb --- old/lib/rack/version.rb 1980-01-02 01:00:00.000000000 +0100 +++ new/lib/rack/version.rb 1980-01-02 01:00:00.000000000 +0100 @@ -20,7 +20,7 @@ VERSION.join(".") end - RELEASE = "2.2.23" + RELEASE = "2.2.25" # Return the Rack release as a dotted string. def self.release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1980-01-02 01:00:00.000000000 +0100 +++ new/metadata 1980-01-02 01:00:00.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rack version: !ruby/object:Gem::Version - version: 2.2.23 + version: 2.2.25 platform: ruby authors: - Leah Neukirchen @@ -182,7 +182,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 4.0.6 +rubygems_version: 4.0.10 specification_version: 4 summary: A modular Ruby webserver interface. test_files: []
