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/erlang-cowboy] f44: Backport fix for CVE-2026-115701 (keep-alive memory-exhaustion DoS)
Date: Fri, 20 Nov 2026 13:30:45 GMT	[thread overview]
Message-ID: <179518144531.1.5899441645862985219.rpms-erlang-cowboy-87e4e86966a8@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/erlang-cowboy
            Branch : f44
            Commit : 87e4e86966a8ffb59a246ee420bcaa37e3769114
            Author : Peter Lemenkov <lemenkov@gmail.com>
            Date   : 2026-11-20T14:30:37+01:00
            Stats  : +37/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/erlang-cowboy/c/87e4e86966a8ffb59a246ee420bcaa37e3769114?branch=f44

            Log:
            Backport fix for CVE-2026-115701 (keep-alive memory-exhaustion DoS)

Applies upstream cowboy commit 3a630c07e1521abf63a1b9ea080509aa1337b60d (released in 2.21.0): stop buffering pipelined HTTP/1 data while a request is in progress, so a slow handler can no longer be fed an unbounded keep-alive buffer.

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

---
diff --git a/cowboy-CVE-2026-115701.patch b/cowboy-CVE-2026-115701.patch
new file mode 100644
index 0000000..8984570
--- /dev/null
+++ b/cowboy-CVE-2026-115701.patch
@@ -0,0 +1,34 @@
+--- a/src/cowboy_http.erl
++++ b/src/cowboy_http.erl
+@@ -273,7 +273,13 @@
+ 		{Passive, Socket} when Passive =:= element(4, Messages);
+ 				%% Hardcoded for compatibility with Ranch 1.x.
+ 				Passive =:= tcp_passive; Passive =:= ssl_passive ->
+-			safe_setopts_active(State),
++			%% A leftover passive message would undo passive/1.
++			case State#state.active of
++				true ->
++					safe_setopts_active(State);
++				false ->
++					ok
++			end,
+ 			before_loop(State);
+ 		%% Timeouts.
+ 		{timeout, Ref, {shutdown, Pid}} ->
+@@ -389,6 +395,7 @@
+ 	terminate(State, {connection_error, timeout,
+ 		'Connection idle longer than configuration allows.'}).
+ 
++%% Empty buffer stays active so tcp_closed/ssl_closed still arrive.
+ parse(<<>>, State) ->
+ 	before_loop(State#state{buffer= <<>>});
+ %% Do not process requests that come in after the last request
+@@ -399,7 +406,7 @@
+ 	before_loop(State#state{buffer= <<>>});
+ %% Delay parsing pipelined requests until current stream stops.
+ parse(Buffer, State=#state{in_state=ps_next_request, stream=#stream{}}) ->
+-	before_loop(State#state{buffer=Buffer});
++	before_loop(passive(State#state{buffer=Buffer}));
+ parse(Buffer, State=#state{in_state=ps_next_request, stream=undefined}) ->
+ 	next_request(State#state{buffer=Buffer});
+ parse(Buffer, State=#state{in_state=#ps_request_line{empty_lines=EmptyLines}}) ->

diff --git a/erlang-cowboy.spec b/erlang-cowboy.spec
index 80dabb3..51bf9b3 100644
--- a/erlang-cowboy.spec
+++ b/erlang-cowboy.spec
@@ -9,6 +9,9 @@ License:	ISC
 URL:		https://github.com/ninenines/%{realname}
 VCS:		git:%{url}.git
 Source0:	%{url}/archive/%{version}/%{realname}-%{version}.tar.gz
+# Backport fix for CVE-2026-115701 (keep-alive connection memory-exhaustion DoS).
+# Upstream commit 3a630c07e1521abf63a1b9ea080509aa1337b60d (released in 2.21.0).
+Patch0:		cowboy-CVE-2026-115701.patch
 BuildRequires:	erlang-cowlib
 BuildRequires:	erlang-ct_helper
 BuildRequires:	erlang-gun

                 reply	other threads:[~2026-11-20 13:30 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=179518144531.1.5899441645862985219.rpms-erlang-cowboy-87e4e86966a8@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