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 952073A1AB for ; Fri, 17 May 2024 13:42:08 +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=1715953328; cv=none; b=EhHHTdRostA+SIgJ7nm0tGGqEQkLusmcU+v7hWYarvTtm2BW49k9uQ6u5/IwPfNMOl1JUWdYxsG/bPAH4OtvQqxp1fhLJ7hncOb8R7jcpSo3gWfFw0eTjHRylh7u2OVwkwkU1GXLJqCHWZZIkFvWXxJPXqIuc1yC3Y2V6565CPE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715953328; c=relaxed/simple; bh=xD0XclKZyrYxWDT3c8rzcTeWPpUrxWcROwmO6pB6d5M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lqQgOIuBtSnzrng5G8s5esrfGr7zUggnkkhfi5OekfKbWZnuGT/Z59vUF9v68Fo/vmwxHFx4u46muYuhoYoRzynE+ClgqwAxJXN2+o3j8Xbs0PayHbOnp0Cc1dL3aXmcrQBv91kNEwI2lPoQHTsQeRndpy8Etpi1wWzF3gGg21g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gQavl7HI; 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="gQavl7HI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 191D7C2BD10; Fri, 17 May 2024 13:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715953328; bh=xD0XclKZyrYxWDT3c8rzcTeWPpUrxWcROwmO6pB6d5M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=gQavl7HIVs9BPppH5UHLNCQLxStT9Td5EySrJRHtqWw0gmtFNk6WCxu2kjEjtSBpO LaB+gYbWBL6gAX8PqRPlnDbAQ35TmnZujRXrmgoEIdW7sfFwCk8QA5kCa0Lut0nEPn rSyiVN65sTUZCJfHHcWuTBEaYr7ZVuPQl78SNaxs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35831: io_uring: Fix release of pinned pages when __io_uaddr_map fails Date: Fri, 17 May 2024 15:41:46 +0200 Message-ID: <2024051742-CVE-2024-35831-abcc@gregkh> X-Mailer: git-send-email 2.45.1 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=2360; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xD0XclKZyrYxWDT3c8rzcTeWPpUrxWcROwmO6pB6d5M=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnucdOCT/VV+D2SFjE9ZjrNTlBOVpat/oqnRT9PJfO9W 6pGk0M7YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCI/1jIs2CnG6GdR7bt1oj9r fPOmVReDPmhKMcyVf6V2y7pa8uHPFIHd5heKw0/OTq8AAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: io_uring: Fix release of pinned pages when __io_uaddr_map fails Looking at the error path of __io_uaddr_map, if we fail after pinning the pages for any reasons, ret will be set to -EINVAL and the error handler won't properly release the pinned pages. I didn't manage to trigger it without forcing a failure, but it can happen in real life when memory is heavily fragmented. The Linux kernel CVE team has assigned CVE-2024-35831 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 223ef4743164 and fixed in 6.6.23 with commit 0b6f39c175ba Issue introduced in 6.6 with commit 223ef4743164 and fixed in 6.7.11 with commit 712e2c8415f5 Issue introduced in 6.6 with commit 223ef4743164 and fixed in 6.8.2 with commit 4d376d7ad62b Issue introduced in 6.6 with commit 223ef4743164 and fixed in 6.9 with commit 67d1189d1095 Issue introduced in 6.5.7 with commit 3f3164ce6396 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-2024-35831 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: io_uring/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/0b6f39c175ba5f0ef72bdb3b9d2a06ad78621d62 https://git.kernel.org/stable/c/712e2c8415f55a4a4ddaa98a430b87f624109f69 https://git.kernel.org/stable/c/4d376d7ad62b6a8e8dfff56b559d9d275e5b9b3a https://git.kernel.org/stable/c/67d1189d1095d471ed7fa426c7e384a7140a5dd7