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 D8DE92E62DA for ; Tue, 30 Dec 2025 12:15:31 +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=1767096931; cv=none; b=XBYwJ2Ra6kWRyV/xO1EHLVxKDyEBPLW/xhkJ+G5kDGuBoG8P5+5xrEcDdfYmVvFPO+OAWABElgAFoio4M/epLAkvx3VjlRXvC7QDVEmF0xO/qG4uVL1ZItEUurWoYZgO3jr3uHiY6Bt1MvKdtPsftFd5FhZ6dLOzXwLn47pgS/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096931; c=relaxed/simple; bh=Visfq0uxYLQwyGpsVkmuRcW2dsb5yLer5m8bf3N/xZM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oRgRBzVMq2880tbk4tEfqWsg3X3RKXYncrrDuQXSNxFxYkcKjVdtnf7oa0C+csIQaYeJzh2JV9FaVK+NdhjxaONrfiSMi3FHgsmKBF8mRIQcTMKmC4yy2mIUYLdZqgPbT9FKkISS73K+sbtO3scG4G1pltZx/9BdbRfzm9CqKM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AhR/n6y7; 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="AhR/n6y7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A0C0C4CEFB; Tue, 30 Dec 2025 12:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096931; bh=Visfq0uxYLQwyGpsVkmuRcW2dsb5yLer5m8bf3N/xZM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=AhR/n6y7Qx/AqHO7ZcLX9xRdpOS7Aqosga+Dx/hADDQcVejVvLifa7J4hxcNTVP1W 34IfwR83ybH1PWMkrHFGWrAoF4A4jdEX+pDuBx6HIWTrcmL57NEzzwN7XuS9cf8Jwb JLCBbO4CViu7yihN6eboo+R/9K/WmJAzrVNVG7YA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54227: blk-mq: fix tags leak when shrink nr_hw_queues Date: Tue, 30 Dec 2025 13:13:57 +0100 Message-ID: <2025123029-CVE-2023-54227-5c6c@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2164; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9ZNZvzf2CN9NCP+9hcxPemRJV7cFrBp6t1+XCsAma1A=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB1/eKJmvN1ll8q+JqsVn1C8Eun3wkG/1cm//MSt1G 3fMz41uHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRHBuGBROEv+zKE/CvmKB4 XuNp7vJfz08XXWSYp+Bk7Pbpj7+1lvMWFxmrlUYbbnxbAAA= 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: blk-mq: fix tags leak when shrink nr_hw_queues Although we don't need to realloc set->tags[] when shrink nr_hw_queues, we need to free them. Or these tags will be leaked. How to reproduce: 1. mount -t configfs configfs /mnt 2. modprobe null_blk nr_devices=0 submit_queues=8 3. mkdir /mnt/nullb/nullb0 4. echo 1 > /mnt/nullb/nullb0/power 5. echo 4 > /mnt/nullb/nullb0/submit_queues 6. rmdir /mnt/nullb/nullb0 In step 4, will alloc 9 tags (8 submit queues and 1 poll queue), then in step 5, new_nr_hw_queues = 5 (4 submit queues and 1 poll queue). At last in step 6, only these 5 tags are freed, the other 4 tags leaked. The Linux kernel CVE team has assigned CVE-2023-54227 to this issue. Affected and fixed versions =========================== Fixed in 6.5.5 with commit c0ef7493e68b8896806a2f598fcffbaa97333405 Fixed in 6.6 with commit e1dd7bc93029024af5688253b0c05181d6e01f8e 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-54227 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: block/blk-mq.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/c0ef7493e68b8896806a2f598fcffbaa97333405 https://git.kernel.org/stable/c/e1dd7bc93029024af5688253b0c05181d6e01f8e