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 2158B21771F for ; Thu, 27 Mar 2025 16:46:17 +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=1743093977; cv=none; b=sOFzpOSGV/4eJ59pckdg3IBLsLUs/WnuiCM3WhPao05BQ4tia8o1icOuUV2oDSo03diroAClrrju0SSYenk+Kjb7sdshSZRmpDMgyb0+c43tiYG9TlSISNUYUp+1QiPEdtkQWT38QsyB2q3jNv+ErrhJBcsfBRjEQKVo9by1dTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743093977; c=relaxed/simple; bh=XeaSWkDmXM9R5ToJfExJFnMDyoe/J5JGSmBxBiqj+Fk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gaFlpvBWZV1hqAwW2ZoifcS2MVX8b9apqBcEg+3TQNXcXyIJbVfY8wQeNOa9GvSSnzikbCoXpnem5LrlXia1J9xGkssSxKnyA7AOiNkMNdsMXfiT31pn8FFf7dSHN0y9BgvmzKcCBu7+5t4xwZoULw5XdSbqcYOR+Do7oa42swA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mQ3MlQkQ; 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="mQ3MlQkQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89192C4CEE5; Thu, 27 Mar 2025 16:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743093977; bh=XeaSWkDmXM9R5ToJfExJFnMDyoe/J5JGSmBxBiqj+Fk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mQ3MlQkQ7BIFhtx8/B0nCAJabeF6EHPkJzuDo7cbfQClab1A0mEiLfBWnt1Nbml4V UfXVuOhdoLwcLjdxiQGQ9b+Qaj2rbCMRI4Z8PfJGwpda6IbqyItKnDF8b9M34OPl4q CfEQpNnlSzUurSY9kBpNIgrNC8TdSCkz1l2F17oo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52980: block: ublk: extending queue_size to fix overflow Date: Thu, 27 Mar 2025 17:43:27 +0100 Message-ID: <2025032705-CVE-2023-52980-0fea@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=2494; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XeaSWkDmXM9R5ToJfExJFnMDyoe/J5JGSmBxBiqj+Fk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPGyR5eererEh/Fe6cV/bP7I2kw/R9Bg4HH4Q9DBZxv DjhyaGFHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR6V8Z5qn9Vnt+Zon3UTG9 FTICN4MLeB0MNjHMU7f8sSjJoaCTy/SBiaxhkqrXUg5XAA== 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: block: ublk: extending queue_size to fix overflow When validating drafted SPDK ublk target, in a case that assigning large queue depth to multiqueue ublk device, ublk target would run into a weird incorrect state. During rounds of review and debug, An overflow bug was found in ublk driver. In ublk_cmd.h, UBLK_MAX_QUEUE_DEPTH is 4096 which means each ublk queue depth can be set as large as 4096. But when setting qd for a ublk device, sizeof(struct ublk_queue) + depth * sizeof(struct ublk_io) will be larger than 65535 if qd is larger than 2728. Then queue_size is overflowed, and ublk_get_queue() references a wrong pointer position. The wrong content of ublk_queue elements will lead to out-of-bounds memory access. Extend queue_size in ublk_device as "unsigned int". The Linux kernel CVE team has assigned CVE-2023-52980 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 71f28f3136aff5890cd56de78abc673f8393cad9 and fixed in 6.1.11 with commit ee1e3fe4b4579f856997190a00ea4db0307b4332 Issue introduced in 6.0 with commit 71f28f3136aff5890cd56de78abc673f8393cad9 and fixed in 6.2 with commit 29baef789c838bd5c02f50c88adbbc6b955aaf61 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-52980 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/ee1e3fe4b4579f856997190a00ea4db0307b4332 https://git.kernel.org/stable/c/29baef789c838bd5c02f50c88adbbc6b955aaf61