public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/erlang] f44: Backported fixes for CVE-2026-73270, CVE-2026-75538
@ 2026-10-14 11:44 Peter Lemenkov
0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-10-14 11:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/erlang
Branch : f44
Commit : e4bbedbfdc4cc04a84a96aa4fbe30735e94e5058
Author : Peter Lemenkov <lemenkov@gmail.com>
Date : 2026-10-14T13:44:12+02:00
Stats : +168/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/erlang/c/e4bbedbfdc4cc04a84a96aa4fbe30735e94e5058?branch=f44
Log:
Backported fixes for CVE-2026-73270, CVE-2026-75538
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
diff --git a/erlang.spec b/erlang.spec
index ccf6c1e..10a0cf5 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -70,7 +70,7 @@
Name: erlang
Version: 26.2.5.21
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: General-purpose programming language and runtime environment
License: Apache-2.0
@@ -122,6 +122,8 @@ Patch20: otp-0020-public_key-Cap-policy-tree-growth-to-prevent-DoS.patch
Patch21: otp-0021-asn1-Mitigate-a-DoS-vector.patch
Patch22: otp-0022-ssh-Limit-size-of-channel-cache-entries.patch
Patch23: otp-0023-ssl-Reject-unsolicited-TLS-1.3-pre_shared_key-in-cli.patch
+Patch24: otp-0024-Avoid-signed-int-overflows.patch
+Patch25: otp-0025-inets-Canonicalize-request-path-before-mod_auth-dire.patch
# end of autogenerated patch tag list
BuildRequires: gcc
@@ -1970,6 +1972,9 @@ ERL_TOP=${ERL_TOP} make TARGET=${TARGET} release_tests
%changelog
+* Wed Oct 14 2026 Peter Lemenkov <lemenkov@gmail.com> - 26.2.5.21-9
+- Backported fixes for CVE-2026-73270, CVE-2026-75538
+
* Wed Sep 23 2026 Peter Lemenkov <lemenkov@gmail.com> - 26.2.5.21-8
- Backported fixes for CVE-2026-65634, CVE-2026-68956, CVE-2026-89422
diff --git a/otp-0024-Avoid-signed-int-overflows.patch b/otp-0024-Avoid-signed-int-overflows.patch
new file mode 100644
index 0000000..9eb2b57
--- /dev/null
+++ b/otp-0024-Avoid-signed-int-overflows.patch
@@ -0,0 +1,51 @@
+From: Raimo Niskanen <raimo@erlang.org>
+Date: Fri, 21 Aug 2026 17:22:41 +0200
+Subject: [PATCH] Avoid signed int overflows
+
+(cherry picked from commit 08e8efdba8500d2d6f54c6b1de1492b228017c9b)
+
+diff --git a/erts/emulator/beam/packet_parser.c b/erts/emulator/beam/packet_parser.c
+index a349c3ff84..8e3430b8ed 100644
+--- a/erts/emulator/beam/packet_parser.c
++++ b/erts/emulator/beam/packet_parser.c
+@@ -481,14 +481,14 @@ more:
+ return 0;
+
+ remain:
+- {
+- int tlen = hlen + plen;
+- if ((max_plen != 0 && plen > max_plen)
+- || tlen < (int)hlen) { /* wrap-around protection */
+- return -1;
+- }
+- return tlen;
+- }
++ ASSERT(INT_MAX >= hlen);
++ if (max_plen == 0) {
++ max_plen = INT_MAX - hlen;
++ }
++ if (plen > max_plen) {
++ return -1;
++ }
++ return hlen + plen;
+
+ done:
+ return plen;
+diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
+index c7c3b73ff8..d5e5567e06 100644
+--- a/erts/emulator/drivers/common/inet_drv.c
++++ b/erts/emulator/drivers/common/inet_drv.c
+@@ -11425,7 +11425,12 @@ static int tcp_expand_buffer(tcp_descriptor* desc, int len)
+ int offs1;
+ int offs2;
+ int used = desc->i_ptr_start - desc->i_buf->orig_bytes;
+- int ulen = used + len;
++ int ulen;
++
++ if (len > INT_MAX - used) {
++ return -1;
++ }
++ ulen = used + len;
+
+ if (desc->i_bufsz >= ulen) /* packet will fit */
+ return 0;
diff --git a/otp-0025-inets-Canonicalize-request-path-before-mod_auth-dire.patch b/otp-0025-inets-Canonicalize-request-path-before-mod_auth-dire.patch
new file mode 100644
index 0000000..9b7e9f5
--- /dev/null
+++ b/otp-0025-inets-Canonicalize-request-path-before-mod_auth-dire.patch
@@ -0,0 +1,111 @@
+From: Konrad Pietrzak <konrad@erlang.org>
+Date: Fri, 7 Aug 2026 13:12:11 +0200
+Subject: [PATCH] inets: Canonicalize request path before mod_auth directory
+ check
+
+ The mod_auth directory-matching logic uses re:run/3 to check whether
+ a resolved filesystem path falls inside a protected directory block.
+ This comparison is sensitive to path variants that the operating system
+ treats as equivalent: repeated slashes (//) and, on case-insensitive
+ filesystems (macOS, Windows), case differences.
+
+ Collapse consecutive slashes and, when the underlying filesystem is
+ case-insensitive, normalize case before the authorization decision so
+ that mod_auth, mod_security, and mod_get all operate on the same
+ canonical path.
+
+(cherry picked from commit bac19eb3dbd96cc49b6d8cabc1c04248bf8c79f6)
+
+diff --git a/lib/inets/src/http_server/httpd_request.erl b/lib/inets/src/http_server/httpd_request.erl
+index 891206c0da..3b5d90b43d 100644
+--- a/lib/inets/src/http_server/httpd_request.erl
++++ b/lib/inets/src/http_server/httpd_request.erl
+@@ -340,7 +340,22 @@ validate_uri(RequestURI) ->
+ {error, _, _} ->
+ {error, {bad_request, {malformed_syntax, RequestURI}}};
+ URI ->
+- {ok, URI}
++ {ok, collapse_uri_path_slashes(URI)}
++ end.
++
++%% Collapse consecutive slashes in the path component only.
++%% Uses uri_string:parse/1 to avoid mangling "://" in absolute URIs.
++collapse_uri_path_slashes([$/ | _] = Path) ->
++ %% Path-only form (the common case for httpd requests).
++ httpd_util:collapse_slashes(Path);
++collapse_uri_path_slashes(URI) ->
++ case uri_string:parse(URI) of
++ #{path := Path} = Parsed when map_size(Parsed) > 1 ->
++ %% Absolute URI — collapse only the path, recompose.
++ uri_string:recompose(Parsed#{path => httpd_util:collapse_slashes(Path)});
++ _ ->
++ %% Unparseable or path-only without leading slash.
++ httpd_util:collapse_slashes(URI)
+ end.
+
+ validate_version("HTTP/1.1") ->
+diff --git a/lib/inets/src/http_server/httpd_util.erl b/lib/inets/src/http_server/httpd_util.erl
+index d6c0626d62..7e52997c87 100644
+--- a/lib/inets/src/http_server/httpd_util.erl
++++ b/lib/inets/src/http_server/httpd_util.erl
+@@ -54,7 +54,8 @@
+ mime_type_validate/1,
+ mime_types_validate/1,
+ custom_date/0,
+- error_log/2]).
++ error_log/2,
++ collapse_slashes/1]).
+
+ -removed({flatlength, 1, "use erlang:iolist_size/1 instead"}).
+ -removed({hexlist_to_integer, 1, "use erlang:list_to_integer/2 with base 16 instead"}).
+@@ -722,3 +723,23 @@ mod_error_logging(Mod, ConfigDB, Report) ->
+ _ ->
+ ok
+ end.
++
++%%----------------------------------------------------------------------
++%% collapse_slashes(Path) -> Path
++%%
++%% Collapse consecutive slash characters into a single slash.
++%% This ensures the authorization decision (mod_auth, mod_security)
++%% and the file-serving layer (mod_get) see the same canonical path.
++%% Without this, "//secret/file" bypasses mod_auth's re:run directory
++%% check while the OS still serves the file (treating // as /).
++%%----------------------------------------------------------------------
++-doc false.
++collapse_slashes(Path) ->
++ collapse_slashes(Path, []).
++
++collapse_slashes([], Acc) ->
++ lists:reverse(Acc);
++collapse_slashes([$/,$/ | Rest], Acc) ->
++ collapse_slashes([$/ | Rest], Acc);
++collapse_slashes([C | Rest], Acc) ->
++ collapse_slashes(Rest, [C | Acc]).
+\ No newline at end of file
+diff --git a/lib/inets/src/http_server/mod_alias.erl b/lib/inets/src/http_server/mod_alias.erl
+index c76f2866f4..80eb9d1219 100644
+--- a/lib/inets/src/http_server/mod_alias.erl
++++ b/lib/inets/src/http_server/mod_alias.erl
+@@ -218,7 +218,7 @@ percent_decode_path(InitPath) ->
+ {error, _, _} ->
+ InitPath;
+ Path ->
+- Path
++ httpd_util:collapse_slashes(Path)
+ end
+ end.
+ %%
+diff --git a/lib/inets/src/http_server/mod_auth.erl b/lib/inets/src/http_server/mod_auth.erl
+index 6d9d73d552..01483dd196 100644
+--- a/lib/inets/src/http_server/mod_auth.erl
++++ b/lib/inets/src/http_server/mod_auth.erl
+@@ -470,7 +470,7 @@ secret_path(_Path, [], to_be_found) ->
+ secret_path(_Path, [], Directory) ->
+ {yes, Directory};
+ secret_path(Path, [[NewDirectory] | Rest], Directory) ->
+- case re:run(Path, NewDirectory, [{capture, first}]) of
++ case re:run(Path, NewDirectory, [{capture, first}, caseless]) of
+ {match, _} when Directory =:= to_be_found ->
+ secret_path(Path, Rest, NewDirectory);
+ {match, [{_, Length}]} when Length > length(Directory)->
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-14 11:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 11:44 [rpms/erlang] f44: Backported fixes for CVE-2026-73270, CVE-2026-75538 Peter Lemenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox