public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Peter Lemenkov <lemenkov@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rabbitmq-server] f43: Backport fixes for CVE-2026-67409, CVE-2026-67416, CVE-2026-67418, CVE-2026-67420
Date: Mon, 02 Nov 2026 22:15:14 GMT	[thread overview]
Message-ID: <179365771494.1.14188255458657193921.rpms-rabbitmq-server-c1f474a3510d@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rabbitmq-server
            Branch : f43
            Commit : c1f474a3510d0d3755c9d9a7c1846d707b010987
            Author : Peter Lemenkov <lemenkov@gmail.com>
            Date   : 2026-11-02T23:14:29+01:00
            Stats  : +732/-1 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/rabbitmq-server/c/c1f474a3510d0d3755c9d9a7c1846d707b010987?branch=f43

            Log:
            Backport fixes for CVE-2026-67409, CVE-2026-67416, CVE-2026-67418, CVE-2026-67420

Backported from upstream v4.3.x; no public 4.0.x release carries them:

- 5de287d213: rebuild user tags on credential refresh (CVE-2026-67420)
- d5186e66e0: exact symbol length for AMQP 1.0 body sections (CVE-2026-67416)
- 908f944a1d: strict MQTT 5 property parsing (CVE-2026-67418)
- 335b3e9bd8: reject non-200/invalid JWKS responses (CVE-2026-67409, hand-ported)

CVE-2026-67414 does not apply: 4.0.9 lacks the zero-width array
expansion that the fix replaces. Test hunks are dropped since the
release tarball ships no test directories.

Resolves: rhbz#2559734, rhbz#2561690, rhbz#2561691, rhbz#2544007

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

---
diff --git a/rabbitmq-server-0014-rabbit_access_control-update_state-2-rebuild-user-ta.patch b/rabbitmq-server-0014-rabbit_access_control-update_state-2-rebuild-user-ta.patch
new file mode 100644
index 0000000..66e1c1b
--- /dev/null
+++ b/rabbitmq-server-0014-rabbit_access_control-update_state-2-rebuild-user-ta.patch
@@ -0,0 +1,120 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Michael Klishin <michaelklishin@icloud.com>
+Date: Fri, 24 Jul 2026 17:14:59 -0700
+Subject: [PATCH] rabbit_access_control:update_state/2: rebuild user tags on
+ credential refresh
+
+On JWT token refresh, `update_state/2` reinstalled the backend state
+but discarded the refreshed `#auth_user.tags`.
+
+This rebuilds `#user.tags` from what each refreshed
+backend returns. This would allow tag removals to
+be reflected in the computed state.
+
+(cherry picked from commit 62896c284f879a69fb44bde1dde8141757e6fcf2)
+(cherry picked from commit 5de287d213765ca592ff5848ad2f6b9b98ee6772)
+
+[Backport to 4.0.9: 4.0.9's rabbit_access_control_SUITE discovers unit tests by the _test suffix, so the new case is added as update_state_rebuilds_tags_test/1 instead of being listed in a unit_tests group.]
+
+Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/deps/rabbit/src/rabbit_access_control.erl b/deps/rabbit/src/rabbit_access_control.erl
+index bb04d9d128..ec1dfd525b 100644
+--- a/deps/rabbit/src/rabbit_access_control.erl
++++ b/deps/rabbit/src/rabbit_access_control.erl
+@@ -264,25 +264,38 @@ check_user_id0(ClaimedUserName, #user{username = ActualUserName,
+ update_state(User = #user{authz_backends = Backends0}, NewState) ->
+     %% N.B.: we use foldl/3 and prepending, so the final list of
+     %% backends is in reverse order from the original list.
++    %%
++    %% Rebuild `#user.tags` from the refreshed backends. A refresh can revoke a
++    %% tag, for example `impersonator`, which is honoured by `check_user_id/2`,
++    %% so a stale tag set must not survive the refresh.
+     Backends = lists:foldl(
+-                fun({Module, Impl}, {ok, Acc}) ->
++                fun({Module, Impl}, {ok, Acc, TagsAcc, Refreshed}) ->
+                         AuthUser = auth_user(User, Impl),
+                         case Module:expiry_timestamp(AuthUser) of
+                           never ->
+-                            {ok, [{Module, Impl} | Acc]};
++                            {ok, [{Module, Impl} | Acc], TagsAcc, Refreshed};
+                           _  ->
+                             case Module:update_state(AuthUser, NewState) of
+-                              {ok, #auth_user{impl = Impl1}} ->
+-                                {ok, [{Module, Impl1} | Acc]};
++                              {ok, #auth_user{impl = Impl1, tags = Tags1}} ->
++                                {ok, [{Module, Impl1} | Acc], TagsAcc ++ Tags1, true};
+                               Else -> Else
+                             end
+                         end;
+                    (_, {error, _} = Err)      -> Err;
+                    (_, {refused, _, _} = Err) -> Err
+-                end, {ok, []}, Backends0),
++                end, {ok, [], [], false}, Backends0),
+     case Backends of
+-      {ok, Pairs} -> {ok, User#user{authz_backends = lists:reverse(Pairs)}};
+-      Else        -> Else
++      {ok, Pairs, RefreshedTags, Refreshed} ->
++        %% This branches on `Refreshed` rather than on the tag list being
++        %% empty, because a refresh to a token with no tags must still clear the
++        %% old tags.
++        Tags = case Refreshed of
++                   true  -> RefreshedTags;
++                   false -> User#user.tags
++               end,
++        {ok, User#user{authz_backends = lists:reverse(Pairs), tags = Tags}};
++      Else ->
++        Else
+     end.
+ 
+ -spec permission_cache_can_expire(User :: rabbit_types:user()) -> boolean().
+diff --git a/deps/rabbit/test/rabbit_access_control_SUITE.erl b/deps/rabbit/test/rabbit_access_control_SUITE.erl
+index 6c2d9dc3a5..a8ea7319cf 100644
+--- a/deps/rabbit/test/rabbit_access_control_SUITE.erl
++++ b/deps/rabbit/test/rabbit_access_control_SUITE.erl
+@@ -102,3 +102,44 @@ expiry_timestamp_test(_) ->
+                                     {rabbit_expiry_backend, unused}]},
+     ?assertEqual(Now, rabbit_access_control:expiry_timestamp(User7)),
+     ok.
++
++%% A refresh must rebuild `#user.tags`. Without this a tag that the new
++%% credential revoked, for example `impersonator`, would survive and still be
++%% honoured by `check_user_id/2`.
++update_state_rebuilds_tags_test(_) ->
++    Mod = rabbit_refresh_backend,
++    ok = meck:new(Mod, [non_strict]),
++    meck:expect(Mod, expiry_timestamp, fun(_) -> os:system_time(seconds) + 60 end),
++    %% This stands in for a refresh-capable backend. It returns a fresh tag set
++    %% from the new credential, as OAuth's `update_state/2` does.
++    meck:expect(Mod, update_state,
++                fun(AuthUser, NewTags) ->
++                        {ok, AuthUser#auth_user{tags = NewTags,
++                                                impl = fun() -> NewTags end}}
++                end),
++
++    User = #user{username = <<"u">>,
++                 tags = [impersonator, management],
++                 authz_backends = [{Mod, unused}]},
++
++    {ok, U1} = rabbit_access_control:update_state(User, [management]),
++    ?assertEqual([management], U1#user.tags),
++    ?assertNot(lists:member(impersonator, U1#user.tags)),
++
++    %% A refresh to a credential with no tags clears them; keeping the old set
++    %% here would leave impersonator behind.
++    {ok, U2} = rabbit_access_control:update_state(User, []),
++    ?assertEqual([], U2#user.tags),
++
++    {ok, U3} = rabbit_access_control:update_state(User, [impersonator, management]),
++    ?assert(lists:member(impersonator, U3#user.tags)),
++
++    %% A backend without expiry is not refreshed and leaves the tags as they are.
++    ok = meck:new(rabbit_static_backend, [non_strict]),
++    meck:expect(rabbit_static_backend, expiry_timestamp, fun(_) -> never end),
++    Static = #user{username = <<"u">>,
++                   tags = [administrator],
++                   authz_backends = [{rabbit_static_backend, unused}]},
++    {ok, U4} = rabbit_access_control:update_state(Static, ignored),
++    ?assertEqual([administrator], U4#user.tags),
++    ok.

diff --git a/rabbitmq-server-0015-Match-exact-symbol-length-when-detecting-AMQP-1.0-bo.patch b/rabbitmq-server-0015-Match-exact-symbol-length-when-detecting-AMQP-1.0-bo.patch
new file mode 100644
index 0000000..a1c5174
--- /dev/null
+++ b/rabbitmq-server-0015-Match-exact-symbol-length-when-detecting-AMQP-1.0-bo.patch
@@ -0,0 +1,110 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: David Ansari <david.ansari@gmx.de>
+Date: Thu, 23 Jul 2026 14:15:01 +0200
+Subject: [PATCH] Match exact symbol length when detecting AMQP 1.0 body
+ sections
+
+In server_mode, the parser recognised the symbolic message body
+descriptors (amqp:data:binary, amqp:amqp-sequence:list and
+amqp:amqp-value:*) by their textual prefix only, ignoring the encoded
+symbol length. A described value whose descriptor merely started with
+one of these names was therefore classified as the corresponding
+standard body section.
+
+(cherry picked from commit c9b4b10c2dbf0f1c89f10b482ac8b45f84dc5954)
+(cherry picked from commit d5186e66e056960f58e2d0fbee2fcc66e1ed6fb9)
+
+[Backport to 4.0.9: only the two new server_mode test cases are added to binary_parser_SUITE; the other cases in the upstream test list come from unrelated later commits.]
+
+Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/deps/amqp10_common/src/amqp10_binary_parser.erl b/deps/amqp10_common/src/amqp10_binary_parser.erl
+index c8e07513db..96de6df33e 100644
+--- a/deps/amqp10_common/src/amqp10_binary_parser.erl
++++ b/deps/amqp10_common/src/amqp10_binary_parser.erl
+@@ -248,17 +248,17 @@ pm(<<?DESCRIBED, ?CODE_ULONG, ?DESCRIPTOR_CODE_AMQP_SEQUENCE:64, _Rest/binary>>,
+     reached_body(B, ?DESCRIPTOR_CODE_AMQP_SEQUENCE);
+ pm(<<?DESCRIBED, ?CODE_ULONG, ?DESCRIPTOR_CODE_AMQP_VALUE:64, _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_AMQP_VALUE);
+-pm(<<?DESCRIBED, ?CODE_SYM_8, _S:8, "amqp:data:binary", _Rest/binary>>, true, B) ->
++pm(<<?DESCRIBED, ?CODE_SYM_8, 16:8, "amqp:data:binary", _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_DATA);
+-pm(<<?DESCRIBED, ?CODE_SYM_8, _S:8, "amqp:amqp-sequence:list", _Rest/binary>>, true, B) ->
++pm(<<?DESCRIBED, ?CODE_SYM_8, 23:8, "amqp:amqp-sequence:list", _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_AMQP_SEQUENCE);
+-pm(<<?DESCRIBED, ?CODE_SYM_8, _S:8, "amqp:amqp-value:*", _Rest/binary>>, true, B) ->
++pm(<<?DESCRIBED, ?CODE_SYM_8, 17:8, "amqp:amqp-value:*", _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_AMQP_VALUE);
+-pm(<<?DESCRIBED, ?CODE_SYM_32, _S:32, "amqp:data:binary", _Rest/binary>>, true, B) ->
++pm(<<?DESCRIBED, ?CODE_SYM_32, 16:32, "amqp:data:binary", _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_DATA);
+-pm(<<?DESCRIBED, ?CODE_SYM_32, _S:32, "amqp:amqp-sequence:list", _Rest/binary>>, true, B) ->
++pm(<<?DESCRIBED, ?CODE_SYM_32, 23:32, "amqp:amqp-sequence:list", _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_AMQP_SEQUENCE);
+-pm(<<?DESCRIBED, ?CODE_SYM_32, _S:32, "amqp:amqp-value:*", _Rest/binary>>, true, B) ->
++pm(<<?DESCRIBED, ?CODE_SYM_32, 17:32, "amqp:amqp-value:*", _Rest/binary>>, true, B) ->
+     reached_body(B, ?DESCRIPTOR_CODE_AMQP_VALUE);
+ pm(<<?DESCRIBED, ?CODE_ULONG, ?DESCRIPTOR_CODE_PROPERTIES:64, Rest0/binary>>, O = true, B) ->
+     [Value | Rest] = pm(Rest0, O, B+10),
+diff --git a/deps/amqp10_common/test/binary_parser_SUITE.erl b/deps/amqp10_common/test/binary_parser_SUITE.erl
+index a217509c53..f92960de5b 100644
+--- a/deps/amqp10_common/test/binary_parser_SUITE.erl
++++ b/deps/amqp10_common/test/binary_parser_SUITE.erl
+@@ -21,7 +21,9 @@ all_tests() ->
+     [
+      roundtrip,
+      array_with_extra_input,
+-     unsupported_type
++     unsupported_type,
++     server_mode_symbolic_body_descriptors,
++     server_mode_body_descriptor_prefix_collision
+     ].
+ 
+ groups() ->
+@@ -85,3 +87,45 @@ unsupported_type(_Config) ->
+     Bin = <<UnsupportedType, "hey">>,
+     Expected = {primitive_type_unsupported, UnsupportedType, {position, 0}},
+     ?assertThrow(Expected, amqp10_binary_parser:parse_many(Bin, [])).
++
++%% A symbolic body descriptor of the exact registered length is classified as
++%% the corresponding standard body section in server_mode.
++server_mode_symbolic_body_descriptors(_Config) ->
++    Data8 = <<0, 16#a3, 16, "amqp:data:binary", 16#a0, 1, "x">>,
++    Seq8 = <<0, 16#a3, 23, "amqp:amqp-sequence:list", 16#45>>,
++    Value8 = <<0, 16#a3, 17, "amqp:amqp-value:*", 16#a1, 1, "x">>,
++    ?assertEqual([{{pos, 0}, {body, 16#75}}],
++                 amqp10_binary_parser:parse_many(Data8, [server_mode])),
++    ?assertEqual([{{pos, 0}, {body, 16#76}}],
++                 amqp10_binary_parser:parse_many(Seq8, [server_mode])),
++    ?assertEqual([{{pos, 0}, {body, 16#77}}],
++                 amqp10_binary_parser:parse_many(Value8, [server_mode])),
++    %% The sym32 forms must be classified identically.
++    Data32 = <<0, 16#b3, 16:32, "amqp:data:binary", 16#a0, 1, "x">>,
++    Seq32 = <<0, 16#b3, 23:32, "amqp:amqp-sequence:list", 16#45>>,
++    Value32 = <<0, 16#b3, 17:32, "amqp:amqp-value:*", 16#a1, 1, "x">>,
++    ?assertEqual([{{pos, 0}, {body, 16#75}}],
++                 amqp10_binary_parser:parse_many(Data32, [server_mode])),
++    ?assertEqual([{{pos, 0}, {body, 16#76}}],
++                 amqp10_binary_parser:parse_many(Seq32, [server_mode])),
++    ?assertEqual([{{pos, 0}, {body, 16#77}}],
++                 amqp10_binary_parser:parse_many(Value32, [server_mode])).
++
++server_mode_body_descriptor_prefix_collision(_Config) ->
++    %% Well-formed but unknown descriptor "amqp:data:binary@" (length 17).
++    Collision8 = <<0, 16#a3, 17, "amqp:data:binary", $@, 16#a0, 3, "abc">>,
++    ?assertEqual(
++       [{described, {symbol, <<"amqp:data:binary@">>}, {binary, <<"abc">>}}],
++       amqp10_binary_parser:parse_many(Collision8, [server_mode])),
++
++    %% The same collision via the sym32 constructor.
++    Collision32 = <<0, 16#b3, 17:32, "amqp:data:binary", $@, 16#a0, 3, "abc">>,
++    ?assertEqual(
++       [{described, {symbol, <<"amqp:data:binary@">>}, {binary, <<"abc">>}}],
++       amqp10_binary_parser:parse_many(Collision32, [server_mode])),
++
++    %% A prefix collision on the amqp-value descriptor.
++    ValueCollision = <<0, 16#a3, 18, "amqp:amqp-value:*!", 16#a1, 1, "x">>,
++    ?assertEqual(
++       [{described, {symbol, <<"amqp:amqp-value:*!">>}, {utf8, <<"x">>}}],
++       amqp10_binary_parser:parse_many(ValueCollision, [server_mode])).

diff --git a/rabbitmq-server-0016-Parse-MQTT-properties-strictly.patch b/rabbitmq-server-0016-Parse-MQTT-properties-strictly.patch
new file mode 100644
index 0000000..eb3a07b
--- /dev/null
+++ b/rabbitmq-server-0016-Parse-MQTT-properties-strictly.patch
@@ -0,0 +1,324 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: David Ansari <david.ansari@gmx.de>
+Date: Mon, 27 Jul 2026 13:28:28 +0200
+Subject: [PATCH] Parse MQTT properties strictly
+
+The publishing MQTT client should be disconnected if it sends a malformed
+MQTT packet. An MQTT packet is malformed if it contains properties that
+are not valid for its packet type.
+See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901027
+
+(cherry picked from commit 4639a4318c72a0660e4bc014767fad70ce288fbc)
+(cherry picked from commit 908f944a1d581d10774f8d6d0dcf2a1a713779fb)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/deps/rabbitmq_mqtt/src/rabbit_mqtt_packet.erl b/deps/rabbitmq_mqtt/src/rabbit_mqtt_packet.erl
+index 6b3afd92e3..ed39c34633 100644
+--- a/deps/rabbitmq_mqtt/src/rabbit_mqtt_packet.erl
++++ b/deps/rabbitmq_mqtt/src/rabbit_mqtt_packet.erl
+@@ -109,7 +109,7 @@ parse_packet(Bin, #mqtt_packet_fixed{type = Type,
+                                         <<Id:16, R/binary>> = PacketBin,
+                                         {Id, R}
+                                 end,
+-            {Props, Payload} = parse_props(Rest1, ProtoVer),
++            {Props, Payload} = parse_props(Rest1, ProtoVer, Type),
+             Publish = #mqtt_packet_publish{topic_name = TopicName,
+                                            packet_id = PacketId,
+                                            props = Props},
+@@ -124,7 +124,7 @@ parse_packet(Bin, #mqtt_packet_fixed{type = Type,
+                                           %% [v5 3.4.2.2.1]
+                                           {Rc, #{}};
+                                       <<Rc, PropsBin/binary>> when ProtoVer =:= 5 ->
+-                                          {Props0, <<>>} = parse_props(PropsBin, ProtoVer),
++                                          {Props0, <<>>} = parse_props(PropsBin, ProtoVer, Type),
+                                           {Rc, Props0}
+                                   end,
+             PubAck = #mqtt_packet_puback{packet_id = PacketId,
+@@ -134,7 +134,7 @@ parse_packet(Bin, #mqtt_packet_fixed{type = Type,
+         {?SUBSCRIBE, <<PacketId:16, PacketBin:(Length-2)/binary, Rest/binary>>} ->
+             %% "SUBSCRIBE messages use QoS level 1 to acknowledge multiple subscription requests."
+             1 = Qos,
+-            {Props, Rest1} = parse_props(PacketBin, ProtoVer),
++            {Props, Rest1} = parse_props(PacketBin, ProtoVer, Type),
+             Id = maps:get('Subscription-Identifier', Props, undefined),
+             Subscriptions = [#mqtt_subscription{
+                                 topic_filter = Topic,
+@@ -152,7 +152,7 @@ parse_packet(Bin, #mqtt_packet_fixed{type = Type,
+         {?UNSUBSCRIBE, <<PacketId:16, PacketBin:(Length-2)/binary, Rest/binary>>} ->
+             %% "UNSUBSCRIBE messages use QoS level 1 to acknowledge multiple unsubscribe requests."
+             1 = Qos,
+-            {Props, Rest1} = parse_props(PacketBin, ProtoVer),
++            {Props, Rest1} = parse_props(PacketBin, ProtoVer, Type),
+             Topics = [Topic || <<Len:16, Topic:Len/binary>> <= Rest1],
+             Unsubscribe = #mqtt_packet_unsubscribe{packet_id = PacketId,
+                                                    props = Props,
+@@ -172,7 +172,7 @@ parse_packet(Bin, #mqtt_packet_fixed{type = Type,
+             wrap(Fixed, Disconnect, Rest, ProtoVer);
+         {?DISCONNECT, <<ReasonCode, PacketBin:(Length-1)/binary, Rest/binary>>}
+           when ProtoVer =:= 5 andalso Length > 1 ->
+-            {Props, <<>>} = parse_props(PacketBin, ProtoVer),
++            {Props, <<>>} = parse_props(PacketBin, ProtoVer, Type),
+             Disconnect = #mqtt_packet_disconnect{reason_code = ReasonCode,
+                                                  props = Props},
+             wrap(Fixed, Disconnect, Rest, ProtoVer);
+@@ -221,14 +221,14 @@ parse_connect(<<Len:16, ProtoName:Len/binary,
+                 KeepAlive:16,
+                 Rest0/binary>>) ->
+     true = protocol_name_approved(ProtoVer, ProtoName),
+-    {Props, Rest1} = parse_props(Rest0, ProtoVer),
++    {Props, Rest1} = parse_props(Rest0, ProtoVer, ?CONNECT),
+     {ClientId, Rest2} = parse_bin(Rest1),
+     {WillProps, WillTopic, WillPayload, Rest3} =
+     case WillFlag of
+         0 ->
+             {#{}, undefined, undefined, Rest2};
+         1 ->
+-            {WillProps0, R0} = parse_props(Rest2, ProtoVer),
++            {WillProps0, R0} = parse_props(Rest2, ProtoVer, will_props),
+             {WillTopic0, R1} = parse_bin(R0),
+             {WillPayload0, R2} = parse_bin(R1),
+             {WillProps0, WillTopic0, WillPayload0, R2}
+@@ -287,76 +287,74 @@ int_to_bool(1) -> true.
+ bool_to_int(false) -> 0;
+ bool_to_int(true) -> 1.
+ 
+--spec parse_props(binary(), protocol_version()) ->
++-spec parse_props(binary(), protocol_version(), packet_type() | will_props) ->
+     {properties(), binary()}.
+-parse_props(Bin, Vsn)
++parse_props(Bin, Vsn, _Type)
+   when Vsn < 5 ->
+     {#{}, Bin};
+-parse_props(<<0, Rest/binary>>, 5) ->
++parse_props(<<0, Rest/binary>>, 5, _Type) ->
+     %% "If there are no properties, this MUST be indicated by
+     %% including a Property Length of zero." [MQTT-2.2.2-1]
+     {#{}, Rest};
+-parse_props(Bin, 5) ->
++parse_props(Bin, 5, Type) ->
+     {Len, Rest0} = parse_variable_byte_integer(Bin),
+     <<PropsBin:Len/binary, Rest/binary>> = Rest0,
+-    Props = parse_prop(PropsBin, #{}),
++    Props = parse_prop(PropsBin, Type, #{}),
+     {Props, Rest}.
+ 
+--spec parse_prop(binary(), properties()) ->
++-spec parse_prop(binary(), packet_type() | will_props, properties()) ->
+     properties().
+-parse_prop(<<>>, #{'User-Property' := UserProps} = Props) ->
++parse_prop(<<>>, _Type, #{'User-Property' := UserProps} = Props) ->
+     %% "The Server MUST maintain the order of User Properties"
+     maps:update('User-Property', lists:reverse(UserProps), Props);
+-parse_prop(<<>>, Props) ->
++parse_prop(<<>>, _Type, Props) ->
+     Props;
+-parse_prop(<<16#01, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Payload-Format-Indicator' => Val});
+-parse_prop(<<16#02, Val:32, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Message-Expiry-Interval' => Val});
+-parse_prop(<<16#03, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Content-Type' => Val});
+-parse_prop(<<16#08, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Response-Topic' => Val});
+-parse_prop(<<16#09, Len:16, Val:Len/binary, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Correlation-Data' => Val});
+-parse_prop(<<16#0B, Bin/binary>>, Props) ->
++parse_prop(<<16#01, Val, Bin/binary>>, Type, Props)
++  when Type =:= ?PUBLISH orelse Type =:= will_props ->
++    parse_prop(Bin, Type, Props#{'Payload-Format-Indicator' => Val});
++parse_prop(<<16#02, Val:32, Bin/binary>>, Type, Props)
++  when Type =:= ?PUBLISH orelse Type =:= will_props ->
++    parse_prop(Bin, Type, Props#{'Message-Expiry-Interval' => Val});
++parse_prop(<<16#03, Len:16, Val:Len/binary, Rest/binary>>, Type, Props)
++  when Type =:= ?PUBLISH orelse Type =:= will_props ->
++    parse_prop(Rest, Type, Props#{'Content-Type' => Val});
++parse_prop(<<16#08, Len:16, Val:Len/binary, Rest/binary>>, Type, Props)
++  when Type =:= ?PUBLISH orelse Type =:= will_props ->
++    parse_prop(Rest, Type, Props#{'Response-Topic' => Val});
++parse_prop(<<16#09, Len:16, Val:Len/binary, Bin/binary>>, Type, Props)
++  when Type =:= ?PUBLISH orelse Type =:= will_props ->
++    parse_prop(Bin, Type, Props#{'Correlation-Data' => Val});
++parse_prop(<<16#0B, Bin/binary>>, ?SUBSCRIBE = Type, Props) ->
+     {Val, Rest} = parse_variable_byte_integer(Bin),
+     %% Client sends at most one Subscription-Identifier to the server (in SUBSCRIBE packet).
+     %% "It is a Protocol Error to include the Subscription Identifier more than once." [v5 3.8.2.1.2]
+-    parse_prop(Rest, Props#{'Subscription-Identifier' => Val});
+-parse_prop(<<16#11, Val:32, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Session-Expiry-Interval' => Val});
+-parse_prop(<<16#12, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Assigned-Client-Identifier' => Val});
+-parse_prop(<<16#13, Val:16, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Server-Keep-Alive' => Val});
+-parse_prop(<<16#15, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Authentication-Method' => Val});
+-parse_prop(<<16#16, Len:16, Val:Len/binary, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Authentication-Data' => Val});
+-parse_prop(<<16#17, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Request-Problem-Information' => Val});
+-parse_prop(<<16#18, Val:32, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Will-Delay-Interval' => Val});
+-parse_prop(<<16#19, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Request-Response-Information' => Val});
+-parse_prop(<<16#1A, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Response-Information' => Val});
+-parse_prop(<<16#1C, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Server-Reference' => Val});
+-parse_prop(<<16#1F, Len:16, Val:Len/binary, Rest/binary>>, Props) ->
+-    parse_prop(Rest, Props#{'Reason-String' => Val});
+-parse_prop(<<16#21, Val:16, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Receive-Maximum' => Val});
+-parse_prop(<<16#22, Val:16, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Topic-Alias-Maximum' => Val});
+-parse_prop(<<16#23, Val:16, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Topic-Alias' => Val});
+-parse_prop(<<16#24, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Maximum-QoS' => Val});
+-parse_prop(<<16#25, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Retain-Available' => Val});
+-parse_prop(<<16#26, LenName:16, Name:LenName/binary, LenVal:16, Val:LenVal/binary, Rest/binary>>, Props0) ->
++    parse_prop(Rest, Type, Props#{'Subscription-Identifier' => Val});
++parse_prop(<<16#11, Val:32, Bin/binary>>, Type, Props)
++  when Type =:= ?CONNECT orelse Type =:= ?DISCONNECT ->
++    parse_prop(Bin, Type, Props#{'Session-Expiry-Interval' => Val});
++parse_prop(<<16#15, Len:16, Val:Len/binary, Rest/binary>>, ?CONNECT = Type, Props) ->
++    parse_prop(Rest, Type, Props#{'Authentication-Method' => Val});
++parse_prop(<<16#16, Len:16, Val:Len/binary, Bin/binary>>, ?CONNECT = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Authentication-Data' => Val});
++parse_prop(<<16#17, Val, Bin/binary>>, ?CONNECT = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Request-Problem-Information' => Val});
++parse_prop(<<16#18, Val:32, Bin/binary>>, will_props = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Will-Delay-Interval' => Val});
++parse_prop(<<16#19, Val, Bin/binary>>, ?CONNECT = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Request-Response-Information' => Val});
++parse_prop(<<16#1C, Len:16, Val:Len/binary, Rest/binary>>, ?DISCONNECT = Type, Props) ->
++    parse_prop(Rest, Type, Props#{'Server-Reference' => Val});
++parse_prop(<<16#1F, Len:16, Val:Len/binary, Rest/binary>>, Type, Props)
++  when Type =:= ?PUBACK orelse Type =:= ?DISCONNECT ->
++    parse_prop(Rest, Type, Props#{'Reason-String' => Val});
++parse_prop(<<16#21, Val:16, Bin/binary>>, ?CONNECT = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Receive-Maximum' => Val});
++parse_prop(<<16#22, Val:16, Bin/binary>>, ?CONNECT = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Topic-Alias-Maximum' => Val});
++parse_prop(<<16#23, Val:16, Bin/binary>>, ?PUBLISH = Type, Props) ->
++    parse_prop(Bin, Type, Props#{'Topic-Alias' => Val});
++parse_prop(<<16#26, LenName:16, Name:LenName/binary, LenVal:16, Val:LenVal/binary, Rest/binary>>,
++           Type, Props0) ->
+     %% "The User Property is allowed to appear multiple times to represent multiple
+     %% name, value pairs. The same name is allowed to appear more than once."
+     Pair = {Name, Val},
+@@ -364,19 +362,13 @@ parse_prop(<<16#26, LenName:16, Name:LenName/binary, LenVal:16, Val:LenVal/binar
+                              fun(UserProps) -> [Pair | UserProps] end,
+                              [Pair],
+                              Props0),
+-    parse_prop(Rest, Props);
+-parse_prop(<<16#27, Val:32, Bin/binary>>, Props) ->
++    parse_prop(Rest, Type, Props);
++parse_prop(<<16#27, Val:32, Bin/binary>>, ?CONNECT = Type, Props) ->
+     %% "It is a Protocol Error [...] for the value to be set to zero." [MQTT 5.0 3.1.2.11.4]
+     true = Val > 0,
+-    parse_prop(Bin, Props#{'Maximum-Packet-Size' => Val});
+-parse_prop(<<16#28, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Wildcard-Subscription-Available' => Val});
+-parse_prop(<<16#29, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Subscription-Identifier-Available' => Val});
+-parse_prop(<<16#2A, Val, Bin/binary>>, Props) ->
+-    parse_prop(Bin, Props#{'Shared-Subscription-Available' => Val});
+-parse_prop(<<PropId, _Rest/binary>>, _Props) ->
+-    throw({invalid_property_id, PropId}).
++    parse_prop(Bin, Type, Props#{'Maximum-Packet-Size' => Val});
++parse_prop(<<PropId, _Rest/binary>>, Type, _Props) ->
++    throw({invalid_property_id, PropId, Type}).
+ 
+ -spec parse_variable_byte_integer(binary()) ->
+     {integer(), Rest :: binary()}.
+diff --git a/deps/rabbitmq_mqtt/test/v5_SUITE.erl b/deps/rabbitmq_mqtt/test/v5_SUITE.erl
+index 44a1950944..8759971b3d 100644
+--- a/deps/rabbitmq_mqtt/test/v5_SUITE.erl
++++ b/deps/rabbitmq_mqtt/test/v5_SUITE.erl
+@@ -101,6 +101,8 @@ cluster_size_1_tests() ->
+      publish_property_payload_format_indicator,
+      publish_property_response_topic_correlation_data,
+      publish_property_user_property,
++     publish_property_not_applicable,
++     will_property_not_applicable,
+      disconnect_with_will,
+      will_qos2,
+      will_delay_greater_than_session_expiry,
+@@ -1318,6 +1320,57 @@ publish_property_user_property(Config) ->
+     end,
+     ok = emqtt:disconnect(C).
+ 
++%% "A Control Packet which contains an Identifier which is not valid for its packet
++%% type [...] is a Malformed Packet." [v5 2.2.2.2]
++%% A client sending such an invalid property should get disconnected.
++publish_property_not_applicable(Config) ->
++    Topic = atom_to_binary(?FUNCTION_NAME),
++    Sub = connect(<<"subscriber">>, Config),
++    {ok, _, [0]} = emqtt:subscribe(Sub, Topic),
++    Pub = connect(<<"publisher">>, Config),
++    ok = emqtt:publish(Pub, Topic, #{'Content-Type' => <<"text/plain">>},
++                       <<"applicable">>, [{qos, 0}]),
++    ok = expect_publishes(Sub, Topic, [<<"applicable">>]),
++    ok = emqtt:disconnect(Pub),
++
++    process_flag(trap_exit, true),
++    NotApplicable = [{'Request-Problem-Information', 1},
++                     {'Request-Response-Information', 1},
++                     {'Response-Information', <<"response information">>},
++                     {'Server-Reference', <<"other-host">>},
++                     %% "A PUBLISH packet sent from a Client to a Server MUST NOT
++                     %% contain a Subscription Identifier." [MQTT-3.3.4-6]
++                     {'Subscription-Identifier', 1},
++                     {'Session-Expiry-Interval', 60},
++                     {'Will-Delay-Interval', 60}],
++    lists:foreach(
++      fun({Name, Val}) ->
++              C = connect(atom_to_binary(Name), Config),
++              ok = emqtt:publish(C, Topic, #{Name => Val},
++                                 atom_to_binary(Name), [{qos, 0}]),
++              %% The publisher should get disconnected.
++              util:await_exit(C)
++      end, NotApplicable),
++
++    %% The subscriber received none of the messages above and is still usable.
++    Pub1 = connect(<<"publisher 1">>, Config),
++    ok = emqtt:publish(Pub1, Topic, <<"last">>, qos0),
++    ok = expect_publishes(Sub, Topic, [<<"last">>]),
++    ok = emqtt:disconnect(Sub),
++    ok = emqtt:disconnect(Pub1).
++
++will_property_not_applicable(Config) ->
++    Topic = atom_to_binary(?FUNCTION_NAME),
++    %% 'Request-Problem-Information' is applicable to CONNECT,
++    %% but not to the Will Properties. [v5 2.2.2.2]
++    {C, Connect} = start_client(?FUNCTION_NAME, Config, 0,
++                                [{will_props, #{'Request-Problem-Information' => 1}},
++                                 {will_topic, Topic},
++                                 {will_qos, 0},
++                                 {will_payload, <<"will payload">>}]),
++    unlink(C),
++    ?assertMatch({error, _}, Connect(C)).
++
+ disconnect_with_will(Config) ->
+     Topic = Payload = ClientId = atom_to_binary(?FUNCTION_NAME),
+     Sub = connect(<<"subscriber">>, Config),
+diff --git a/deps/rabbitmq_web_mqtt/test/web_mqtt_v5_SUITE.erl b/deps/rabbitmq_web_mqtt/test/web_mqtt_v5_SUITE.erl
+index 069e2855f8..f826833ad9 100644
+--- a/deps/rabbitmq_web_mqtt/test/web_mqtt_v5_SUITE.erl
++++ b/deps/rabbitmq_web_mqtt/test/web_mqtt_v5_SUITE.erl
+@@ -84,6 +84,7 @@ publish_property_content_type(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ publish_property_payload_format_indicator(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ publish_property_response_topic_correlation_data(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ publish_property_user_property(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
++publish_property_not_applicable(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ disconnect_with_will(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ will_qos2(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ will_delay_greater_than_session_expiry(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+@@ -97,6 +98,7 @@ will_delay_message_expiry(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ will_delay_message_expiry_publish_properties(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ will_delay_properties(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ will_properties(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
++will_property_not_applicable(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ retain_properties(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ topic_alias_client_to_server(Config) -> v5_SUITE:?FUNCTION_NAME(Config).
+ topic_alias_server_to_client(Config) -> v5_SUITE:?FUNCTION_NAME(Config).

diff --git a/rabbitmq-server-0017-OAuth-2-improve-robustness-of-a-token-refresh-path.patch b/rabbitmq-server-0017-OAuth-2-improve-robustness-of-a-token-refresh-path.patch
new file mode 100644
index 0000000..7db6cd5
--- /dev/null
+++ b/rabbitmq-server-0017-OAuth-2-improve-robustness-of-a-token-refresh-path.patch
@@ -0,0 +1,168 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Michael Klishin <michaelklishin@icloud.com>
+Date: Thu, 2 Jul 2026 22:25:49 -0700
+Subject: [PATCH] OAuth 2: improve robustness of a token refresh path
+
+(cherry picked from commit 4411b4cd3d35074666c0fdbdeab3517ed3227a0b)
+(cherry picked from commit 335b3e9bd860d58ea132bb85100e92bcbf363b56)
+
+[Backport to 4.0.9: hand-ported to the 4.0.9 uaa_jwt module, which still logs with rabbit_log and stores keys through rabbit_oauth2_config. Only the self-contained uaa_jwt_SUITE test is kept; prop_SUITE, rabbit_oauth2_provider_SUITE and configurable_http_handler do not exist in 4.0.9 and are dropped.]
+
+Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwks.erl b/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwks.erl
+index edd81902da..4aa96402df 100644
+--- a/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwks.erl
++++ b/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwks.erl
+@@ -3,5 +3,5 @@
+ 
+ -spec get(string() | binary(), term()) -> {ok, term()} | {error, term()}.
+ get(JwksUrl, SslOptions) ->
+-    Options = [{timeout, 60000}] ++ [{ssl, SslOptions}],
++    Options = [{timeout, 60000}, {ssl, SslOptions}],
+     httpc:request(get, {JwksUrl, []}, Options, []).
+diff --git a/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwt.erl b/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwt.erl
+index 084867b38c..0196891ee6 100644
+--- a/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwt.erl
++++ b/deps/rabbitmq_auth_backend_oauth2/src/uaa_jwt.erl
+@@ -10,7 +10,8 @@
+          decode_and_verify/1,
+          get_jwk/2,
+          resolve_resource_server_id/1,
+-         verify_signing_key/2]).
++         verify_signing_key/2,
++         parse_jwks_response/2]).
+ 
+ -export([client_id/1, sub/1, client_id/2, sub/2]).
+ 
+@@ -36,21 +37,46 @@ update_jwks_signing_keys(#oauth_provider{id = Id, jwks_uri = JwksUrl,
+     rabbit_log:debug("OAuth 2 JWT: downloading keys from ~tp (TLS options: ~p)",
+         [JwksUrl, SslOptions]),
+     case uaa_jwks:get(JwksUrl, SslOptions) of
+-        {ok, {_, _, JwksBody}} ->
+-            KeyList = maps:get(<<"keys">>,
+-                jose:decode(erlang:iolist_to_binary(JwksBody)), []),
+-            Keys = maps:from_list(lists:map(fun(Key) ->
+-                {maps:get(<<"kid">>, Key, undefined), {json, Key}} end, KeyList)),
+-            rabbit_log:debug("OAuth 2 JWT: downloaded keys ~tp", [Keys]),
+-            case rabbit_oauth2_config:replace_signing_keys(Keys, Id) of
+-              {error, _} = Err -> Err;
+-              _ -> ok
++        {ok, {StatusLine, _Headers, JwksBody}} ->
++            case parse_jwks_response(StatusLine, JwksBody) of
++                {ok, Keys} ->
++                    rabbit_log:debug("OAuth 2 JWT: downloaded ~p keys", [maps:size(Keys)]),
++                    case rabbit_oauth2_config:replace_signing_keys(Keys, Id) of
++                        {error, _} = Err -> Err;
++                        _ -> ok
++                    end;
++                {error, _} = Err ->
++                    rabbit_log:error("OAuth 2 JWT: failed to download keys from ~tp: ~tp",
++                        [JwksUrl, Err]),
++                    Err
+             end;
+         {error, _} = Err ->
+             rabbit_log:error("OAuth 2 JWT: failed to download keys: ~tp", [Err]),
+             Err
+     end.
+ 
++%% Only a 200 response with a non-empty, well-formed key list is passed on to
++%% replace_signing_keys/2; anything else is reported as an error instead. A
++%% malformed body must not throw either, since the refresh caller does not
++%% catch it and would otherwise drop the connection.
++-spec parse_jwks_response({term(), integer(), term()}, iodata()) ->
++    {ok, map()} | {error, term()}.
++parse_jwks_response({_, 200, _}, JwksBody) ->
++    try
++        KeyList = maps:get(<<"keys">>,
++            jose:decode(erlang:iolist_to_binary(JwksBody)), []),
++        Keys = maps:from_list(lists:map(fun(Key) ->
++            {maps:get(<<"kid">>, Key, undefined), {json, Key}} end, KeyList)),
++        case maps:size(Keys) of
++            0 -> {error, empty_jwks_response};
++            _ -> {ok, Keys}
++        end
++    catch
++        error:_ -> {error, invalid_jwks_response}
++    end;
++parse_jwks_response({_, StatusCode, _}, _JwksBody) ->
++    {error, {unexpected_status_code, StatusCode}}.
++
+ -spec decode_and_verify(binary()) -> {boolean(), binary(), map()} | {error, term()}.
+ decode_and_verify(Token) ->
+     case resolve_resource_server_id(Token) of
+diff --git a/deps/rabbitmq_auth_backend_oauth2/test/uaa_jwt_SUITE.erl b/deps/rabbitmq_auth_backend_oauth2/test/uaa_jwt_SUITE.erl
+new file mode 100644
+index 0000000000..f7db93f109
+--- /dev/null
++++ b/deps/rabbitmq_auth_backend_oauth2/test/uaa_jwt_SUITE.erl
+@@ -0,0 +1,68 @@
++%% This Source Code Form is subject to the terms of the Mozilla Public
++%% License, v. 2.0. If a copy of the MPL was not distributed with this
++%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
++%%
++%% Copyright (c) 2007-2026 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
++%%
++
++-module(uaa_jwt_SUITE).
++
++-compile(export_all).
++
++-include_lib("eunit/include/eunit.hrl").
++
++-import(uaa_jwt, [parse_jwks_response/2]).
++
++all() ->
++    [
++        scenario_a,
++        scenario_b,
++        scenario_c,
++        scenario_d,
++        scenario_e
++    ].
++
++%% A 200 response with a non-empty key list is accepted.
++scenario_a(_Config) ->
++    Body = <<"{\"keys\":[{\"kid\":\"key-1\",\"kty\":\"oct\"}]}">>,
++    {ok, Keys} = parse_jwks_response({"HTTP/1.1", 200, "OK"}, Body),
++    ?assertEqual(#{<<"key-1">> => {json, #{<<"kid">> => <<"key-1">>, <<"kty">> => <<"oct">>}}},
++                 Keys).
++
++%% A 200 response with no keys field is rejected rather than treated as zero keys.
++scenario_b(_Config) ->
++    Body = <<"{\"error\":\"down\"}">>,
++    ?assertEqual({error, empty_jwks_response},
++                 parse_jwks_response({"HTTP/1.1", 200, "OK"}, Body)).
++
++%% A 200 response with an empty key list is rejected.
++scenario_c(_Config) ->
++    Body = <<"{\"keys\":[]}">>,
++    ?assertEqual({error, empty_jwks_response},
++                 parse_jwks_response({"HTTP/1.1", 200, "OK"}, Body)).
++
++%% The status code alone decides the outcome: a non-200 response must be
++%% rejected regardless of its body.
++scenario_d(_Config) ->
++    lists:foreach(fun(StatusCode) ->
++        ?assertEqual({error, {unexpected_status_code, StatusCode}},
++                     parse_jwks_response({"HTTP/1.1", StatusCode, "Error"},
++                                          <<"{\"error\":\"down\"}">>))
++        end, [400, 401, 403, 404, 429, 500, 502, 503]).
++
++%% A 200 body that cannot be parsed as a JWKS returns a clean error rather
++%% than throwing, so the refresh caller is never handed an exception.
++scenario_e(_Config) ->
++    Bodies = [
++        <<"this is not json">>,
++        <<"<html>maintenance</html>">>,
++        <<>>,
++        <<"[]">>,
++        <<"\"just a string\"">>,
++        <<"{\"keys\":\"not-a-list\"}">>,
++        <<"{\"keys\":[\"not-an-object\"]}">>
++    ],
++    lists:foreach(fun(Body) ->
++        ?assertEqual({error, invalid_jwks_response},
++                     parse_jwks_response({"HTTP/1.1", 200, "OK"}, Body))
++        end, Bodies).

diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec
index b98fbb4..54a5c7c 100644
--- a/rabbitmq-server.spec
+++ b/rabbitmq-server.spec
@@ -7,7 +7,7 @@
 
 Name: rabbitmq-server
 Version: 4.0.9
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: MPL-2.0
 Source0: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz
 Source1: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz.asc
@@ -30,6 +30,10 @@ Patch10: rabbitmq-server-0010-HTTP-API-refactor-read_complete_body-1.patch
 Patch11: rabbitmq-server-0011-Remove-deprecated-endpoint.patch
 Patch12: rabbitmq-server-0012-Remove-deprecated-endpoint.patch
 Patch13: rabbitmq-server-0013-AMQP-0-9-1-apply-configure-checks-to-passive-queue-e.patch
+Patch14: rabbitmq-server-0014-rabbit_access_control-update_state-2-rebuild-user-ta.patch
+Patch15: rabbitmq-server-0015-Match-exact-symbol-length-when-detecting-AMQP-1.0-bo.patch
+Patch16: rabbitmq-server-0016-Parse-MQTT-properties-strictly.patch
+Patch17: rabbitmq-server-0017-OAuth-2-improve-robustness-of-a-token-refresh-path.patch
 
 URL: https://www.rabbitmq.com/
 BuildRequires: elixir
@@ -187,6 +191,11 @@ rm -f %{_rabbit_libdir}/lib/rabbitmq_server-%{version}/ebin/rabbit.{rel,script,b
 
 
 %changelog
+* Mon Nov 02 2026 Peter Lemenkov <lemenkov@gmail.com> - 4.0.9-6
+- Backport fixes for CVE-2026-67409 (rhbz#2559734), CVE-2026-67416
+  (rhbz#2561690), CVE-2026-67418 (rhbz#2561691) and CVE-2026-67420
+  (rhbz#2544007)
+
 * Thu Jul 30 2026 Peter Lemenkov <lemenkov@gmail.com> - 4.0.9-5
 - Fixed CVE-2026-57212, CVE-2026-57213, CVE-2026-57215, CVE-2026-57217,
   CVE-2026-57219, CVE-2026-57221

                 reply	other threads:[~2026-11-02 22:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179365771494.1.14188255458657193921.rpms-rabbitmq-server-c1f474a3510d@fedoraproject.org \
    --to=lemenkov@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox