public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rabbitmq-server] f44: Backport fix for CVE-2026-67420
@ 2026-10-09 15:25 Peter Lemenkov
0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-10-09 15:25 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rabbitmq-server
Branch : f44
Commit : 32ced2b824eb333a04b959a90850050b62e31264
Author : Peter Lemenkov <lemenkov@gmail.com>
Date : 2026-10-09T17:03:25+02:00
Stats : +77/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rabbitmq-server/c/32ced2b824eb333a04b959a90850050b62e31264?branch=f44
Log:
Backport fix for CVE-2026-67420
RabbitMQ: unauthorized user impersonation via stale OAuth token refresh.
On JWT token refresh, update_state/2 discarded the refreshed user tags, so
a revoked 'impersonator' tag survived on an existing connection.
Backported from upstream v4.3.x commit 5de287d (cherry-picked from main
62896c28). The release tarball ships no test directory, so only the source
hunk is included.
Resolves: rhbz#2544007
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
diff --git a/rabbitmq-server-0007-rabbit_access_control-update_state-2-rebuild-user-ta.patch b/rabbitmq-server-0007-rabbit_access_control-update_state-2-rebuild-user-ta.patch
new file mode 100644
index 0000000..aa4a7ab
--- /dev/null
+++ b/rabbitmq-server-0007-rabbit_access_control-update_state-2-rebuild-user-ta.patch
@@ -0,0 +1,72 @@
+From af54694e48f0033a4d0a37f46658d23aa85a86d7 Mon Sep 17 00:00:00 2001
+From: Michael Klishin <michaelklishin@icloud.com>
+Date: Fri, 24 Jul 2026 17:14:59 -0700
+Subject: [PATCH 7/7] 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)
+---
+ deps/rabbit/src/rabbit_access_control.erl | 27 +++++++++++++++++------
+ 1 file changed, 20 insertions(+), 7 deletions(-)
+
+diff --git a/deps/rabbit/src/rabbit_access_control.erl b/deps/rabbit/src/rabbit_access_control.erl
+index 70e3cdd946..6912ff8dfd 100644
+--- a/deps/rabbit/src/rabbit_access_control.erl
++++ b/deps/rabbit/src/rabbit_access_control.erl
+@@ -407,25 +407,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().
+--
+2.56.0
+
diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec
index cefe3b2..2d1282b 100644
--- a/rabbitmq-server.spec
+++ b/rabbitmq-server.spec
@@ -8,7 +8,7 @@
Name: rabbitmq-server
Version: 4.2.9
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The RabbitMQ server
License: MPL-2.0
Source0: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz
@@ -26,6 +26,7 @@ Patch: rabbitmq-server-0003-force-python3.patch
Patch: rabbitmq-server-0004-Greatly-simplified-wrapper-script-which-works-proper.patch
Patch: rabbitmq-server-0005-Revert-OTP-26-has-reached-EOL.patch
Patch: rabbitmq-server-0006-rabbit_plugins-demote-duplicate-plugin-warnings-from.patch
+Patch: rabbitmq-server-0007-rabbit_access_control-update_state-2-rebuild-user-ta.patch
URL: https://www.rabbitmq.com/
BuildRequires: elixir
@@ -178,6 +179,9 @@ rm -f %{_rabbit_libdir}/lib/rabbitmq_server-%{version}/ebin/rabbit.{rel,script,b
%changelog
+* Fri Oct 09 2026 Peter Lemenkov <lemenkov@gmail.com> - 4.2.9-3
+- Backport fix for CVE-2026-67420 (rhbz#2544007)
+
* Fri Jul 23 2026 Tobias Urdin <tobias.urdin@binero.com> - 4.2.9-2
- Fix sysusers
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-09 15:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 15:25 [rpms/rabbitmq-server] f44: Backport fix for CVE-2026-67420 Peter Lemenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox