Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 70D302C1AE for ; Wed, 28 Feb 2024 08:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108270; cv=none; b=A6ysxK+zHEkmHu2Svo1JLV3hGjIraiERQ1blgWrR3JEzQyUBsC+m61clqTgPrle4zVVUbaAXxfW5JKZpfk5FWercshJCcxrg9uF8qgfg55C17c8iHKNS6fuLn5mAry0/odCKbJPIE8P2SVFBgV9cXneeLCel0GUFWh0RxkfGqKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108270; c=relaxed/simple; bh=g/wllOPPkXQrUggzbLDG8WexMKpWg5fzvF63/wzkoLk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n/43iNaKuCa67uA3zRobSj4ibaG/M1rbFm1p3ZAVvrachoK3JgMNpvdorCs7p2fQMwESYQRI/oZCkMi3aaljtqBo0/zrAJwq30pGoCu+LduoZDCNoJXQ63bl7oJz6Z1zfX/pH9aYdVou2oNkiVjyKn+vzP0rJRUc71L+li141TM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KFGtSBoL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KFGtSBoL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2AB5C433C7; Wed, 28 Feb 2024 08:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108270; bh=g/wllOPPkXQrUggzbLDG8WexMKpWg5fzvF63/wzkoLk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KFGtSBoLb32qKbXCKQr4XpTqmkPj5dhuZZG8PJVzTcDPBry64oKJJ23LRZorW38vU U9EMmJW9bce/ceLO1B2+PgLYf4+qGnP16Vs1D21e3VwuVRDA2qA+uPDhZzD5iCbdI0 n/xXuNwERctNax2vcOnah6LAw/OZ+DFJ0f8QvWRw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-47040: io_uring: fix overflows checks in provide buffers Date: Wed, 28 Feb 2024 09:15:28 +0100 Message-ID: <2024022838-CVE-2021-47040-8722@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2349; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=A+KeG6NzS6hHAI0n1hMGmdRGQzlLOrPhticb3jGw2X8=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3Xud1fb+4ylL1lvk5qdQF11ekXdZ5qljbdSTQJiH+e OSRSym7OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAijj8YFhz/bKl2ZfPfOY8n sB2ujlnMbnbqnDvD/FQ51lBtvozQMv0PU55yd1sp66zdDQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: io_uring: fix overflows checks in provide buffers Colin reported before possible overflow and sign extension problems in io_provide_buffers_prep(). As Linus pointed out previous attempt did nothing useful, see d81269fecb8ce ("io_uring: fix provide_buffers sign extension"). Do that with help of check__overflow helpers. And fix struct io_provide_buf::len type, as it doesn't make much sense to keep it signed. The Linux kernel CVE team has assigned CVE-2021-47040 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit efe68c1ca8f49 and fixed in 5.10.37 with commit cbbc13b115b8 Issue introduced in 5.8 with commit efe68c1ca8f49 and fixed in 5.11.21 with commit 51bf90901952 Issue introduced in 5.8 with commit efe68c1ca8f49 and fixed in 5.12.4 with commit 84b8c266c4bf Issue introduced in 5.8 with commit efe68c1ca8f49 and fixed in 5.13 with commit 38134ada0cee Please see https://www.kernel.org or 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-2021-47040 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: fs/io_uring.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/cbbc13b115b8f18e0a714d89f87fbdc499acfe2d https://git.kernel.org/stable/c/51bf90901952aaac564bbdb36b2b503050c53dd9 https://git.kernel.org/stable/c/84b8c266c4bfe9ed5128e13253c388deb74b1b03 https://git.kernel.org/stable/c/38134ada0ceea3e848fe993263c0ff6207fd46e7