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 5DEE716C6BD for ; Wed, 21 Aug 2024 06:13:16 +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=1724220796; cv=none; b=ldQqRtDrcyExxU+4wabOEoBMdpM0ijCE0vZKy7UZNwXFkGc7pFOBYI579/oDAY+getRgOAKHv+KUNA9drLBhl/kkW8FHvMBm2GfNVbha20hBosXfpXKhqwfjKZiXBHepxDX0uDRdbTW0cv51gR/vD67/kSvUAvU5wq8M7jSU5OA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724220796; c=relaxed/simple; bh=jSkieLZZhLzesLH0nxcV+WXxSEYbdPcuahKcoNPARBo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KSe5JaRbFNe/N6KbgyZNk7ymvrEipMIPpyiNZ7hR5t0Zo6/KEjIMEXm9KJIGWZOvyM7Yz8MDp95U5T4nlFuh2TRnWwnwn0SCW+a1Yhkv3c96kfdw+/3fr0/WTNmdRi32NH7xxCJn6/9zcFcHVd6TMajEsNgnCbwj5CyvUzp2GXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lMZ2fcgb; 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="lMZ2fcgb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E30B3C32782; Wed, 21 Aug 2024 06:13:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724220796; bh=jSkieLZZhLzesLH0nxcV+WXxSEYbdPcuahKcoNPARBo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=lMZ2fcgbPMbgO3oeIpfH5fmh3/vUOH6vvEBTHlo2ulPRAc/QYadVIvfgcnXI24Sap PUp9pvq2tm/SFZp3wHFVIetlhRMC0w8GV+jiIsgNpQqVsu50lRRPSw2wNmPWKSAN/G 5DYFZklQbOXZd577noZOaMl5Bii027/bHGWYQzcI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52903: io_uring: lock overflowing for IOPOLL Date: Wed, 21 Aug 2024 14:11:44 +0800 Message-ID: <2024082113-CVE-2023-52903-ad59@gregkh> X-Mailer: git-send-email 2.46.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=2913; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jSkieLZZhLzesLH0nxcV+WXxSEYbdPcuahKcoNPARBo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlHWxkV0jRv27wMkap9PiHq4ddLLm4ufT9CbmrUtfEej 3nq+GpGRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyEx5hhwZGpKzitZFwa5u8q lWwu3sT34mH1ZYZ5VvLzdFerrrY0XHzUYNusFKmtv4umAgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: io_uring: lock overflowing for IOPOLL syzbot reports an issue with overflow filling for IOPOLL: WARNING: CPU: 0 PID: 28 at io_uring/io_uring.c:734 io_cqring_event_overflow+0x1c0/0x230 io_uring/io_uring.c:734 CPU: 0 PID: 28 Comm: kworker/u4:1 Not tainted 6.2.0-rc3-syzkaller-16369-g358a161a6a9e #0 Workqueue: events_unbound io_ring_exit_work Call trace:  io_cqring_event_overflow+0x1c0/0x230 io_uring/io_uring.c:734  io_req_cqe_overflow+0x5c/0x70 io_uring/io_uring.c:773  io_fill_cqe_req io_uring/io_uring.h:168 [inline]  io_do_iopoll+0x474/0x62c io_uring/rw.c:1065  io_iopoll_try_reap_events+0x6c/0x108 io_uring/io_uring.c:1513  io_uring_try_cancel_requests+0x13c/0x258 io_uring/io_uring.c:3056  io_ring_exit_work+0xec/0x390 io_uring/io_uring.c:2869  process_one_work+0x2d8/0x504 kernel/workqueue.c:2289  worker_thread+0x340/0x610 kernel/workqueue.c:2436  kthread+0x12c/0x158 kernel/kthread.c:376  ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:863 There is no real problem for normal IOPOLL as flush is also called with uring_lock taken, but it's getting more complicated for IOPOLL|SQPOLL, for which __io_cqring_overflow_flush() happens from the CQ waiting path. The Linux kernel CVE team has assigned CVE-2023-52903 to this issue. Affected and fixed versions =========================== Fixed in 5.10.165 with commit de77faee2801 Fixed in 5.15.89 with commit ed4629d1e968 Fixed in 6.1.7 with commit 7fc3990dad04 Fixed in 6.2 with commit 544d163d659d 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-2023-52903 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/rw.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/de77faee280163ff03b7ab64af6c9d779a43d4c4 https://git.kernel.org/stable/c/ed4629d1e968359fbb91d0a3780b1e86a2c08845 https://git.kernel.org/stable/c/7fc3990dad04a677606337ebc61964094d6cb41b https://git.kernel.org/stable/c/544d163d659d45a206d8929370d5a2984e546cb7