Skip to content

Commit 4205930

Browse files
[AutoPR- Security] Patch rabbitmq-server for CVE-2026-8466 [HIGH] (#17452)
(cherry picked from commit 455f649)
1 parent e7cae45 commit 4205930

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
From fe423c373907c1eee207964c52e73740ea293f05 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
3+
Date: Tue, 12 May 2026 12:12:20 +0200
4+
Subject: [PATCH] Reject multipart header blocks above 2048 bytes
5+
6+
This is a soft limit. If the data is already in the buffer,
7+
the header block will be parsed normally.
8+
9+
A hardcoded value of 2048 was chosen because it is twice
10+
larger than the largest expected multipart header blocks.
11+
12+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
13+
Upstream-reference: https://github.com/ninenines/cowboy/commit/5c6a2061b41bb5771c4659fac7d5a822dca5bafb.patch
14+
---
15+
deps/cowboy/src/cowboy_req.erl | 16 ++++++++++++----
16+
1 file changed, 12 insertions(+), 4 deletions(-)
17+
18+
diff --git a/deps/cowboy/src/cowboy_req.erl b/deps/cowboy/src/cowboy_req.erl
19+
index 3f87677..e910b7f 100644
20+
--- a/deps/cowboy/src/cowboy_req.erl
21+
+++ b/deps/cowboy/src/cowboy_req.erl
22+
@@ -611,11 +611,9 @@ read_part(Req, Opts) ->
23+
read_part(Buffer, Opts, Req=#{multipart := {Boundary, _}}) ->
24+
try cow_multipart:parse_headers(Buffer, Boundary) of
25+
more ->
26+
- {Data, Req2} = stream_multipart(Req, Opts, headers),
27+
- read_part(<< Buffer/binary, Data/binary >>, Opts, Req2);
28+
+ read_part_more(Buffer, Opts, Req);
29+
{more, Buffer2} ->
30+
- {Data, Req2} = stream_multipart(Req, Opts, headers),
31+
- read_part(<< Buffer2/binary, Data/binary >>, Opts, Req2);
32+
+ read_part_more(Buffer2, Opts, Req);
33+
{ok, Headers0, Rest} ->
34+
Headers = maps:from_list(Headers0),
35+
%% Reject multipart content containing duplicate headers.
36+
@@ -630,6 +628,16 @@ read_part(Buffer, Opts, Req=#{multipart := {Boundary, _}}) ->
37+
}, Stacktrace)
38+
end.
39+
40+
+%% We reject multipart header blocks that are twice the maximum
41+
+%% size of the largest expected multipart header blocks.
42+
+read_part_more(Buffer, _, _) when byte_size(Buffer) > 2048 ->
43+
+ exit({request_error, {multipart, headers},
44+
+ 'Malformed body; multipart header block too large.'
45+
+ });
46+
+read_part_more(Buffer, Opts, Req0) ->
47+
+ {Data, Req} = stream_multipart(Req0, Opts, headers),
48+
+ read_part(<<Buffer/binary, Data/binary>>, Opts, Req).
49+
+
50+
-spec read_part_body(Req)
51+
-> {ok, binary(), Req} | {more, binary(), Req}
52+
when Req::req().
53+
--
54+
2.45.4
55+

SPECS/rabbitmq-server/rabbitmq-server.spec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ URL: https://rabbitmq.com
1111
Source0: https://github.com/rabbitmq/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
1212
Patch0: CVE-2025-30219.patch
1313
Patch1: CVE-2025-50200.patch
14+
<<<<<<< HEAD
1415
Patch2: CVE-2026-43968.patch
1516
Patch3: CVE-2026-7790.patch
17+
=======
18+
Patch2: CVE-2026-8466.patch
19+
>>>>>>> 455f6491fd ([AutoPR- Security] Patch rabbitmq-server for CVE-2026-8466 [HIGH] (#17452))
1620

1721
BuildRequires: elixir
1822
BuildRequires: erlang
@@ -69,8 +73,13 @@ done
6973
%{_libdir}/rabbitmq/lib/rabbitmq_server-%{version}/*
7074

7175
%changelog
76+
<<<<<<< HEAD
7277
* Fri May 15 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 3.13.7-4
7378
- Patch for CVE-2026-7790, CVE-2026-43968
79+
=======
80+
* Wed May 27 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 3.13.7-4
81+
- Patch for CVE-2026-8466
82+
>>>>>>> 455f6491fd ([AutoPR- Security] Patch rabbitmq-server for CVE-2026-8466 [HIGH] (#17452))
7483

7584
* Wed Oct 29 2025 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 3.13.7-3
7685
- Patch for CVE-2025-50200

0 commit comments

Comments
 (0)