From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796189369; b=JFLAoHl1XyWCNThhFIKlZKHfbvbwOK8qRyhSV4ly3S7fU+2ZsyLlf0nRXRQ2qDHyWZCO d02nqQMJj8QCA1967KKMeMGx9oWzkc2n9LLzHUHaFDKWdUUrg1bacvQ84MGaec5fO7Ua3 1ATeLZ/tKSl/k63gJ+aZx2HT/38mxQ8CjDuW99Ri3nSEJ3hihERyyKnFz3A6yRc+4KG/v JcrSAi30vuz5LlEYt04gUDFZuZ8p2nDateam4r9PDa66qGXjTZQND5o7T64LBDGuPZh/3 KH9Tn/C4jq1vx7kT6xuWHDCH7Q34RPLYwndqiJ9wEsAg+XiSBH4IxvJM4skOmPAVyGg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796189369; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=rHs5d9HiqELIOxsBIZ9tMVnmi/eb8XZi93rgs259Nu8=; b=5sjI2BuuddcfGO5cSJexcPSL9FXj36w9/jQ8juZOFvA6Bc6qXh4qMW9Qh3OmJlayxGQx HcB/ahhzHoU8lv0QVXPQ955yGBaxVG423zhXfiWd/MVx8xTaKG2lXbLhs8Qfi0XA8232o DbI/HobzK0rCOs0XaeyqwN7PJTpuVZN2CSEoVid3+iigwn8fJc7ppeCuhDW5eTj6low5p rG/zDKAwU6gdDaz6AYRY9uyPulEB7oPEbNJQH3h2Ql9Uh/tHhauIDhI4OxGEIgqMSz5Cu ItdAMb6S8rQBOlNO1K4AaBtptinEx4QWc9irgTHlCHp162P5HDM2PzGzbm68eFDgIHQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="NSAIx/dz"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24107606A323 for ; Wed, 2 Dec 2026 05:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NSAIx/dz Received: by smtp.kernel.org (Postfix) with ESMTPSA id 696731F00896; Wed, 2 Dec 2026 05:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796189368; bh=rHs5d9HiqELIOxsBIZ9tMVnmi/eb8XZi93rgs259Nu8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=NSAIx/dzjCjbT585MUYRGtbLNLOd+Tz9FnEcJhvRb25IbxLcxm/LHReNWLuaK2TW5 1zr/d0jIjzeAxnKjzfw19DStn/mvsNcg7OtQF3fbHLG9cFPG0h9VP+RYamoo0GD8B1 7z1BlkXwrLa4PwuJhrO/JTCrxg2+kqENEoW1tWNQJHKCQDK+Q/QgakNt+imUTpo8Gx OlUshsgTLev5BJDgaLz5mBmvl+LQ8i8u5adHf6Q3OpzzC02nCWx+KLZN295re9ME8A ywn3wgW2BpLlSB5nA9ykLEaJPuRYOEbi2w5386XrmT1nNoiQ0Ghrtq4qklDJC5bZPW uykBDpovJzPzA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v3] net/rds: tcp: bound the memory held for an incoming message Reply-To: sashiko-reviews@lists.linux.dev To: "Weidong Wang" Cc: linux-rdma@vger.kernel.org In-Reply-To: <20261201-h047-send-v3-1-a70043d448b1@illinois.edu> References: <20261201-h047-send-v3-1-a70043d448b1@illinois.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 05:29:28 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > From: Weidong Wang >=20 > rds_tcp_data_recv() queues pskb_extract() clones on the incoming > message until h_len bytes, taken from the peer's header, have arrived. > The clones are not charged to the socket, so a peer can make the > receiver hold up to 4 GiB by announcing a large h_len, or over 1 GiB > for a 1 MiB message sent one byte per segment, as each clone keeps the > truesize of the skb it was cut from. >=20 > Drop the connection when h_len exceeds RDS_MAX_MSG_SIZE, the limit > rds_sendmsg() enforces since v4.11, and discard the rest of the stream > until shutdown. Copy, rather than clone, pieces smaller than a quarter > of their skb's truesize, appending to a linear skb until it is full, so > that a message holds at most about four times its size. >=20 > Found by an AI code review agent and reproduced under QEMU. The fix and > changelog were drafted with AI assistance (Claude), then reviewed and > tested by the submitter. >=20 > Fixes: 70041088e3b9 ("RDS: Add TCP transport to RDS") > Cc: stable@vger.kernel.org > Cc: Zijie Zhao > Signed-off-by: Weidong Wang Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-h047-send-= v3-1-a70043d448b1@illinois.edu?part=3D1