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 9738F446B4 for ; Tue, 21 May 2024 15:38:13 +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=1716305893; cv=none; b=AAF4TFwF6kQSMlHnzZEstxfZeiaKYbsIYYYnmk2ao5I7J5AahY9yIcy3LvBW2XKYqdlBLv0aFnTLpQL8Z70aBv32N5Que3bOU9SjWM3nnmLvPFnnLEUpUbT/0UPYEGTeW1uLfinjC3flUZbVmnwwmVh8modvLQbIO0U684E2ebA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305893; c=relaxed/simple; bh=wT8WVWxT4k3lx6Ti2rHDIsgpM/m+TeJFpNUGa+ZTVmo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kJrwG65wizrtidblQaIFS2lzS3D6Ohss1zOJqLQesaDCth+UXW/lBoX1EoDb9kHhsEPzIh694kaVeIJiDmgahm6sW3L+lxaBdN/zWmNZMmKDTAUOuu0uuaNTqItMpA0qokluterJyAaCiHNEgBawr28lqQtTakIAjT3qOP8qJFc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0Knwcb4C; 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="0Knwcb4C" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2436FC2BD11; Tue, 21 May 2024 15:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305893; bh=wT8WVWxT4k3lx6Ti2rHDIsgpM/m+TeJFpNUGa+ZTVmo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0Knwcb4CfjemoXP/kDWRqC4iavZLrb4HIXYzZWPv5MvNqfRHv1ir7WcrCTjFCWoRs 4YFC8+WxsRXVFqBnKaQR5ukGdGbXnGcp3DKYJm181w/tuSQHoYQVuFNVnhIpOg+Zcn jXpyhOqdCuQlnkEUQD/rDuTy4Hz0CL+UflT5bk/o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52811: scsi: ibmvfc: Remove BUG_ON in the case of an empty event pool Date: Tue, 21 May 2024 17:31:47 +0200 Message-ID: <2024052102-CVE-2023-52811-2a5f@gregkh> X-Mailer: git-send-email 2.45.1 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=2778; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wT8WVWxT4k3lx6Ti2rHDIsgpM/m+TeJFpNUGa+ZTVmo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk++8zS3ybPODZb/dU5Hv45Dh4zJZvXH5Y7stWAPz5fb MYUfcOVHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARj3iGObz+P5cnzvn4993F 3WVve85dS7NMWcswz+LmtjK9Bsc1zec9F1y5V/fsTqWwLwA= 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: scsi: ibmvfc: Remove BUG_ON in the case of an empty event pool In practice the driver should never send more commands than are allocated to a queue's event pool. In the unlikely event that this happens, the code asserts a BUG_ON, and in the case that the kernel is not configured to crash on panic returns a junk event pointer from the empty event list causing things to spiral from there. This BUG_ON is a historical artifact of the ibmvfc driver first being upstreamed, and it is well known now that the use of BUG_ON is bad practice except in the most unrecoverable scenario. There is nothing about this scenario that prevents the driver from recovering and carrying on. Remove the BUG_ON in question from ibmvfc_get_event() and return a NULL pointer in the case of an empty event pool. Update all call sites to ibmvfc_get_event() to check for a NULL pointer and perfrom the appropriate failure or recovery action. The Linux kernel CVE team has assigned CVE-2023-52811 to this issue. Affected and fixed versions =========================== Fixed in 5.15.140 with commit e1d1f79b1929 Fixed in 6.1.64 with commit 88984ec47927 Fixed in 6.5.13 with commit d2af4ef80601 Fixed in 6.6.3 with commit 8bbe784c2ff2 Fixed in 6.7 with commit b39f2d10b86d 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-52811 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/ibmvscsi/ibmvfc.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/e1d1f79b1929dce470a5dc9281c574cd58e8c6c0 https://git.kernel.org/stable/c/88984ec4792766df5a9de7a2ff2b5f281f94c7d4 https://git.kernel.org/stable/c/d2af4ef80601224b90630c1ddc7cd2c7c8ab4dd8 https://git.kernel.org/stable/c/8bbe784c2ff28d56ca0c548aaf3e584edc77052d https://git.kernel.org/stable/c/b39f2d10b86d0af353ea339e5815820026bca48f