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 568BC3D6F for ; Thu, 1 May 2025 12:58:49 +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=1746104330; cv=none; b=G+ddww25tOZXwMCdUvVfFgPaNhLJf6+aZMz5PoTT1N9yXToumgakFwpuw89elZ4pqYVRoCbKhHT0KhKJmQ3/sHBXc/TtX4i/ezokiAlB9yUm2ekeRq2yhtYgc2EnhJQho1ngVJaK1ZjzZGMXVBH7LEWtz7vPF/i7n4tONsCcC00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104330; c=relaxed/simple; bh=nHTNjV0XYNRN0KI8PfUGUFgwpBrtL59WpUu72yr930o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I9a1uFILNkPHARP/p2+nsyl1aS/8PsYHMmUN4D/ycRx301TsfuGbBxtDviwdX57yY6AQZAKxz7ADvp+YQVuUlngbxzrmikIDHabx4iy0Av80D5VwUUYqz/bUQTNXGyGvoxKRWS5J5oZKWEozjrnM5ViHo4cyaB+5ZtnNw5mDBbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S2eLegys; 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="S2eLegys" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DB3FC4CEE3; Thu, 1 May 2025 12:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104329; bh=nHTNjV0XYNRN0KI8PfUGUFgwpBrtL59WpUu72yr930o=; h=From:To:Cc:Subject:Date:Reply-to:From; b=S2eLegysUI9osZrWYTuko1qgj6wDnurtXKzuDzfs88KqFcUG4198IX+/DzWDgomm9 ld5N0mZAH2xHYR86T3IQ44keTjqwWLyZHe+Xo5DoCgYlfeSyRorN0jo7uVkB8OwpLc d3SFuIAgqizFTGBoOART9PUm/2GMQr4JfwuxFbko= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37759: ublk: fix handling recovery & reissue in ublk_abort_queue() Date: Thu, 1 May 2025 14:57:05 +0200 Message-ID: <2025050140-CVE-2025-37759-5f57@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=3262; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dszN73DHpmbODMEO4F5PhlHQBHEVfYafJ6qdmd5uqy0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnC+R3F2eEfTiwyV0x3m1HwytfNR+jjbj7tqRt7WxekK ++a/bq/I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYS+YJhvkM3p0zesqfvju38 EsqdY+66crvkFobZLCx23xw4+p5qfNu/8OlC/6Dj/Ys2AgA= 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: ublk: fix handling recovery & reissue in ublk_abort_queue() Commit 8284066946e6 ("ublk: grab request reference when the request is handled by userspace") doesn't grab request reference in case of recovery reissue. Then the request can be requeued & re-dispatch & failed when canceling uring command. If it is one zc request, the request can be freed before io_uring returns the zc buffer back, then cause kernel panic: [ 126.773061] BUG: kernel NULL pointer dereference, address: 00000000000000c8 [ 126.773657] #PF: supervisor read access in kernel mode [ 126.774052] #PF: error_code(0x0000) - not-present page [ 126.774455] PGD 0 P4D 0 [ 126.774698] Oops: Oops: 0000 [#1] SMP NOPTI [ 126.775034] CPU: 13 UID: 0 PID: 1612 Comm: kworker/u64:55 Not tainted 6.14.0_blk+ #182 PREEMPT(full) [ 126.775676] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014 [ 126.776275] Workqueue: iou_exit io_ring_exit_work [ 126.776651] RIP: 0010:ublk_io_release+0x14/0x130 [ublk_drv] Fixes it by always grabbing request reference for aborting the request. The Linux kernel CVE team has assigned CVE-2025-37759 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 8284066946e6d9cc979566ce698fe24e7ca0b31e and fixed in 6.12.24 with commit caa5c8a2358604f38bf0a4afaa5eacda13763067 Issue introduced in 6.5 with commit 8284066946e6d9cc979566ce698fe24e7ca0b31e and fixed in 6.13.12 with commit 5d34a30efac9c9c93e150130caa940c0df6053c1 Issue introduced in 6.5 with commit 8284066946e6d9cc979566ce698fe24e7ca0b31e and fixed in 6.14.3 with commit 0a21d259ca4d6310fdfcc0284ebbc000e66cbf70 Issue introduced in 6.5 with commit 8284066946e6d9cc979566ce698fe24e7ca0b31e and fixed in 6.15-rc2 with commit 6ee6bd5d4fce502a5b5a2ea805e9ff16e6aa890f 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-37759 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/caa5c8a2358604f38bf0a4afaa5eacda13763067 https://git.kernel.org/stable/c/5d34a30efac9c9c93e150130caa940c0df6053c1 https://git.kernel.org/stable/c/0a21d259ca4d6310fdfcc0284ebbc000e66cbf70 https://git.kernel.org/stable/c/6ee6bd5d4fce502a5b5a2ea805e9ff16e6aa890f