From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8FD558496C for ; Fri, 11 Sep 2026 19:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156577; cv=none; b=o6p+mlLiMJx32gswNEY5kjGX96J9wOs2auCylpVJX0yp0/WACd1IV0UlH9yn0v/qJQbom8cOtzvANMuuAfrRkGP3kKE2TgQw2reSHWVFh1z+FlzxqsjZ/ky24tId35xZOvwqBf82tvI8GJQcT/UopZtns0avHczs9ZE8KYT9WZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156577; c=relaxed/simple; bh=jdgHgYGaZBFX2mSaZNmNaEQ+CgcpsSYRrgWH35aNtQI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qSCbTLByhYuH/KlWNKB02Ep1o+YcZHH/xWGWgt+mmah4pMkE27dC4Df2J84OH0JyFC6kbCJPX4qgZ2dSfuQ9NPjKkokFrMUr/ia2xenwyYiyp2HDPU22JCZFSNKBpqLjByP80QLSmpOHTNbG5k3knsQfSdhUVQOkQPa8XrD1MW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Y8LahVIS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Y8LahVIS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADD4B1F0089E; Fri, 11 Sep 2026 19:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156562; bh=OtzNWUKatZFiDAO8Mv4sOdBwLvaXnJn05vsfN+G+Yg4=; h=From:To:Cc:Subject:Date:Reply-To; b=Y8LahVIS15PqPADCMUnUFNiDLrNKX9KptYH9Bilj8TEtUtpOxl4zy+/hVxQCQ133A q7KSO8mj6gK8wVnktH/y66P8VCFz2H+wAu+QCbNtiCHdBS+KayBVhu/4Ydo3zXy4UH eNxgzZ1sZ0Wolnot/DvkjdDnET5pJVHyEM8p9PqQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89551: SUNRPC: xdr_buf_trim: clamp buf->len to avoid underflow Date: Fri, 11 Sep 2026 21:44:00 +0200 Message-ID: <2026091121-CVE-2026-89551-6dc1@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3609; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=A8znJz2G2qxGpTOyV9a4DY+LYs9v+ZT2pcJ0UxdrhwY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIhNvBXxLb912OPetjO4art/rjm+3/bveqnvelwNHX Vaa161k7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ3PrNME/PNEx5tvOX4k/f DHpVV6TOiF8n8Z5hwbHJ5/6eT+/O+ry8Xm/D0e+/rvLYZgIA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: SUNRPC: xdr_buf_trim: clamp buf->len to avoid underflow xdr_buf_trim() trims `len` bytes from the tail of an xdr_buf by walking the tail, pages, and head iovecs. Each per-section step uses min_t() so it never removes more bytes than that section holds, but the final accounting at the fix_len label subtracts the total bytes actually consumed from buf->len without any clamp: fix_len: buf->len -= (len - trim); When the caller has set buf->len to a value smaller than the sum of the iov_lens, (len - trim) can exceed buf->len and the unsigned subtraction wraps to near UINT_MAX. gss_krb5_unwrap_v2() reaches xdr_buf_trim() in exactly that state: buf->head[0].iov_len -= GSS_KRB5_TOK_HDR_LEN + headskip; buf->len = len - (GSS_KRB5_TOK_HDR_LEN + headskip); xdr_buf_trim(buf, ec + GSS_KRB5_TOK_HDR_LEN + tailskip); buf->len is a small wire-derived value while the iov_lens are at page scale, so the per-section loops legitimately consume far more bytes than buf->len records. The wrapped buf->len then propagates as the authoritative stream bound into every downstream XDR decoder. Fix by clamping the decrement so buf->len bottoms out at zero: buf->len -= min_t(unsigned int, buf->len, len - trim); On the normal path where the iov_lens sum to buf->len, (len - trim) is always <= buf->len and the result is identical to before. No callers change behavior outside the underflow case. The Linux kernel CVE team has assigned CVE-2026-89551 to this issue. Affected and fixed versions =========================== Issue introduced in 3.9 with commit 4c190e2f913f038c9c91ee63b59cd037260ba353 and fixed in 6.12.109 with commit e6267cccd7b05cc514e57f2160aa8db85f5c2701 Issue introduced in 3.9 with commit 4c190e2f913f038c9c91ee63b59cd037260ba353 and fixed in 6.18.50 with commit ad0cce80d4af2f74674e8b635d97aa3880e83da8 Issue introduced in 3.9 with commit 4c190e2f913f038c9c91ee63b59cd037260ba353 and fixed in 7.2.4 with commit 85e9602650e9df07190abe817cee3b4d9bc3df17 Issue introduced in 3.9 with commit 4c190e2f913f038c9c91ee63b59cd037260ba353 and fixed in 7.3-rc1 with commit 3f491306dcb673ff5e78e1044ba450c58978774e Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-89551 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/sunrpc/xdr.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/e6267cccd7b05cc514e57f2160aa8db85f5c2701 https://git.kernel.org/stable/c/ad0cce80d4af2f74674e8b635d97aa3880e83da8 https://git.kernel.org/stable/c/85e9602650e9df07190abe817cee3b4d9bc3df17 https://git.kernel.org/stable/c/3f491306dcb673ff5e78e1044ba450c58978774e