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 385603B3C06 for ; Wed, 25 Mar 2026 10:30:46 +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=1774434646; cv=none; b=Z8LxHJkQgYvEoVnOdK7Wc0yODNtkU8bs5a/xBrnbAIGx5GjNjDgN+jLXuAbPHgQzV/0tOdR7xWgXUXjG01PcgNh6pHCPclIAVd71H2rgt/uAMowZBuK6I48rKCA8IkBJc9/OJnpEDrLj97D8xAximjAF9sCHtLVxLQN8UiK4Jxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434646; c=relaxed/simple; bh=ERKUM8B61AwlK0bpCA8AN88rsPQRKtszB7z9L72/M4M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dApU3Hk5C6s+wpa9v1r5o14Sz4ZG5Wi4bYW4YVzTbkYkrkv2HsMYTo6vYzshXaPrBmXs7gv5ueHcFPYv7XCdtAHm8NTp2+CbvQNCaj6HOqJiD1lEYfI5LDuiTa/l3+cnnUrnkcj1hJtffHWJbSzvP+OQsd+i5aCC/rMocyAOTi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jZqNBpCf; 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="jZqNBpCf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCAC5C4CEF7; Wed, 25 Mar 2026 10:30:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774434646; bh=ERKUM8B61AwlK0bpCA8AN88rsPQRKtszB7z9L72/M4M=; h=From:To:Cc:Subject:Date:Reply-To:From; b=jZqNBpCfF0wNDuJlN61S8oKQzXPW+DHqAdwuXUxgBuRzAl68Vsb/Jpv2eRH22qgHT +LHoHfObqqbIXkj+osnVQZB6KzzEq1w6TP/t3v2NYsRme5axv0YRV5HTUfhanRpt43 b4Uo+UqJUoyb1ysPP2vrYP6cvIqix/WniEskCxyo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23306: scsi: pm8001: Fix use-after-free in pm8001_queue_command() Date: Wed, 25 Mar 2026 11:26:50 +0100 Message-ID: <2026032528-CVE-2026-23306-8854@gregkh> X-Mailer: git-send-email 2.53.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=3513; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QVVYkFqTmUvJYEQgeVorB1E4GyeHWcGERYc8YfqonzM=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmHd4RcuPJp3cx/l/3ev3g/V1Syfr/Xqmc8AQUXrmn9T 1wf1fb2f0csC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBMxF2QYa5kr6prQNur6+uY uNbNTX3pY7S3bw7DgoMsXIb/Z12JEWBYu/Jy1DRu7mmLsgE= 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: scsi: pm8001: Fix use-after-free in pm8001_queue_command() Commit e29c47fe8946 ("scsi: pm8001: Simplify pm8001_task_exec()") refactors pm8001_queue_command(), however it introduces a potential cause of a double free scenario when it changes the function to return -ENODEV in case of phy down/device gone state. In this path, pm8001_queue_command() updates task status and calls task_done to indicate to upper layer that the task has been handled. However, this also frees the underlying SAS task. A -ENODEV is then returned to the caller. When libsas sas_ata_qc_issue() receives this error value, it assumes the task wasn't handled/queued by LLDD and proceeds to clean up and free the task again, resulting in a double free. Since pm8001_queue_command() handles the SAS task in this case, it should return 0 to the caller indicating that the task has been handled. The Linux kernel CVE team has assigned CVE-2026-23306 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit e29c47fe8946cc732b0e0d393b65b13c84bb69d0 and fixed in 6.1.167 with commit ebbb852ffbc952b95ddb7e3872b67b3e74c6da47 Issue introduced in 5.18 with commit e29c47fe8946cc732b0e0d393b65b13c84bb69d0 and fixed in 6.6.130 with commit 8b00427317ba7b7ec91252b034009f638d0f311b Issue introduced in 5.18 with commit e29c47fe8946cc732b0e0d393b65b13c84bb69d0 and fixed in 6.12.77 with commit c5dc39f8ae055520fd778b7fb0423f11586f15c4 Issue introduced in 5.18 with commit e29c47fe8946cc732b0e0d393b65b13c84bb69d0 and fixed in 6.18.17 with commit 824a7672e3540962d5c77d4c6666254d7aa6f0b3 Issue introduced in 5.18 with commit e29c47fe8946cc732b0e0d393b65b13c84bb69d0 and fixed in 6.19.7 with commit 227ff4af00abc40b95123cc27ee8079069dcd8d7 Issue introduced in 5.18 with commit e29c47fe8946cc732b0e0d393b65b13c84bb69d0 and fixed in 7.0-rc2 with commit 38353c26db28efd984f51d426eac2396d299cca7 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-2026-23306 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/scsi/pm8001/pm8001_sas.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/ebbb852ffbc952b95ddb7e3872b67b3e74c6da47 https://git.kernel.org/stable/c/8b00427317ba7b7ec91252b034009f638d0f311b https://git.kernel.org/stable/c/c5dc39f8ae055520fd778b7fb0423f11586f15c4 https://git.kernel.org/stable/c/824a7672e3540962d5c77d4c6666254d7aa6f0b3 https://git.kernel.org/stable/c/227ff4af00abc40b95123cc27ee8079069dcd8d7 https://git.kernel.org/stable/c/38353c26db28efd984f51d426eac2396d299cca7