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 A72171946C8 for ; Wed, 16 Apr 2025 14:16:40 +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=1744813000; cv=none; b=SZRCff46AO2Q0oKE0Eswi+M2wJLDm833+gKUmFABxb5fmyLEikJOSR6L1Y3mQ3t1XZab4XafoEGYcgSgYcJ/TqiH0igc9tq3dNlglmYbAEhcxPUsH1sZ6xTmO4Ogcn+JNRGj/ID9Ji5sHFG4QiSeaZugXla1Jk0xvRtD+MQeqiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744813000; c=relaxed/simple; bh=OU2mw1V1DpVCLMu94gMN4tSWgqMnWrBBpcR3xW9GUlI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rPxJkrK7Te8me6XsyTIHQKDAqK+RN3OaEt5jyxwCrbg47iG3Y2HvLKQvjQPfAaaqsxvfnBLKgS7icXFP1poe9TkrdX0zW0N1PfnNeWyaB18LMeS7F3mhvzgynoNBl5lQ33USSyJdCk+dzlDOJTr76DTy6bnwzvasueAfK+hqlR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KhEB61ZN; 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="KhEB61ZN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18229C4CEE2; Wed, 16 Apr 2025 14:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744813000; bh=OU2mw1V1DpVCLMu94gMN4tSWgqMnWrBBpcR3xW9GUlI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KhEB61ZNQ62Wptm7BN7ZmJHIJGNxImEFKZNUBXGHgrVu1VLrDTuPpjzUJ2cM/LsKR 8suVYpuQ9fDPsKwCqf71sANuj+1i3VVN+3R1B6XrwDHeGPAR36wH4GyaQylzfLfzrc HVhikz7L4NQAFR4Uk6UCUfnFvYm49kBezfFiqzjI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22068: ublk: make sure ubq->canceling is set when queue is frozen Date: Wed, 16 Apr 2025 16:12:39 +0200 Message-ID: <2025041609-CVE-2025-22068-8ffd@gregkh> X-Mailer: git-send-email 2.49.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=2638; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OU2mw1V1DpVCLMu94gMN4tSWgqMnWrBBpcR3xW9GUlI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d+3cbsp//i7/ilcWn258VmBrzDOYvVXf2m6im8yko 2LTyzZc74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ8IsyzE95xT1r5cL+lubN qXf+vz7V4jP1znGGBTPTNbatrNK+ms6wcFOLbl1EkZNQLwA= 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: ublk: make sure ubq->canceling is set when queue is frozen Now ublk driver depends on `ubq->canceling` for deciding if the request can be dispatched via uring_cmd & io_uring_cmd_complete_in_task(). Once ubq->canceling is set, the uring_cmd can be done via ublk_cancel_cmd() and io_uring_cmd_done(). So set ubq->canceling when queue is frozen, this way makes sure that the flag can be observed from ublk_queue_rq() reliably, and avoids use-after-free on uring_cmd. The Linux kernel CVE team has assigned CVE-2025-22068 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.12.23 with commit 7e3497d7dacb5aee69dd9be842b778083cae0e75 Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.13.11 with commit 5491400589e7572c2d2627ed6384302f7672aa1d Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.14.2 with commit 9158359015f0eda00e521e35b7bc7ebce176aebf Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.15-rc1 with commit 8741d0737921ec1c03cf59aebf4d01400c2b461a 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-2025-22068 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: drivers/block/ublk_drv.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/7e3497d7dacb5aee69dd9be842b778083cae0e75 https://git.kernel.org/stable/c/5491400589e7572c2d2627ed6384302f7672aa1d https://git.kernel.org/stable/c/9158359015f0eda00e521e35b7bc7ebce176aebf https://git.kernel.org/stable/c/8741d0737921ec1c03cf59aebf4d01400c2b461a