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 F0F2A3D6F for ; Thu, 1 May 2025 12:58:01 +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=1746104282; cv=none; b=n7/+vCnC/hYyYfPy3uEvqn41FtKmjjGmzi3Ce8WYQbArw290Qt7kujtij4eo1OJT1suhe6Amr5XhOBT4z5UHDbt+1Ni/GAbl9e+MY+gdQW91ekjqafBYTGriCmxo0NF0P3pXhn5YEmxqQDWL8ln16YH/61yksCt3CKAzAYoL1BM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104282; c=relaxed/simple; bh=CF2FBdY6TG1vcpyahS1QNRQzuRhiUk3K/XWGvReJ8Uc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=fihHtWVaZ6BGs1efzr/0bLrL5ea7HgBFLFf6hcysmh2im7ysVuJN/GbehpR6rskCi5Dviw/GBzlEfEwQ+PJN+cVppx+I8htR99LncITOxURMAuugew16C/JkGn8NDIwNgKV/OIWLs8l3/2xw5kBWZIH95WMAQfmRysCdWznzWW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QTEr5ebW; 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="QTEr5ebW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60A1EC4CEE3; Thu, 1 May 2025 12:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104281; bh=CF2FBdY6TG1vcpyahS1QNRQzuRhiUk3K/XWGvReJ8Uc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QTEr5ebWpeILFi5SWLdiB2X9ceRPMIg9CwIvdJvDjisMSajdpO/ul9f/satxVVozr zP3oHvcGcNxEfMT536jTDmUIkYl49mIESeghziY5Va8LuAFUmMupw6kTT5qPorygyV ZwFhTVWTAvI/Q0bS0lWtE8kukWpP4h2ZvZRUczgI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-23147: i3c: Add NULL pointer check in i3c_master_queue_ibi() Date: Thu, 1 May 2025 14:56:27 +0200 Message-ID: <2025050126-CVE-2025-23147-cfd5@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=3624; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rA8s6PAvGj0TfEt+f4+9P53/DJHbllN7rNsRk75E6XU=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnC+VWblxxSDuv4njmV3XTf+6M6L95eSnWTmr7soVvxp 3rem7JxHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRsAsMC1Z8XfnxFDdDi9nO B6l3L4gnfM+6z8IwP1+y586/9V7WMt2qhp8vPmYuifk6AQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: i3c: Add NULL pointer check in i3c_master_queue_ibi() The I3C master driver may receive an IBI from a target device that has not been probed yet. In such cases, the master calls `i3c_master_queue_ibi()` to queue an IBI work task, leading to "Unable to handle kernel read from unreadable memory" and resulting in a kernel panic. Typical IBI handling flow: 1. The I3C master scans target devices and probes their respective drivers. 2. The target device driver calls `i3c_device_request_ibi()` to enable IBI and assigns `dev->ibi = ibi`. 3. The I3C master receives an IBI from the target device and calls `i3c_master_queue_ibi()` to queue the target device driver’s IBI handler task. However, since target device events are asynchronous to the I3C probe sequence, step 3 may occur before step 2, causing `dev->ibi` to be `NULL`, leading to a kernel panic. Add a NULL pointer check in `i3c_master_queue_ibi()` to prevent accessing an uninitialized `dev->ibi`, ensuring stability. The Linux kernel CVE team has assigned CVE-2025-23147 to this issue. Affected and fixed versions =========================== Issue introduced in 5.0 with commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 and fixed in 6.1.135 with commit d83b0c03ef8fbea2f03029a1cc1f5041f0e1d47f Issue introduced in 5.0 with commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 and fixed in 6.6.88 with commit 6871a676aa534e8f218279672e0445c725f81026 Issue introduced in 5.0 with commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 and fixed in 6.12.24 with commit e6bba328578feb58c614c11868c259b40484c5fa Issue introduced in 5.0 with commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 and fixed in 6.13.12 with commit fe4a4fc179b7898055555a11685915473588392e Issue introduced in 5.0 with commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 and fixed in 6.14.3 with commit ff9d61db59bb27d16d3f872bff2620d50856b80c Issue introduced in 5.0 with commit 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 and fixed in 6.15-rc1 with commit bd496a44f041da9ef3afe14d1d6193d460424e91 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-23147 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/i3c/master.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/d83b0c03ef8fbea2f03029a1cc1f5041f0e1d47f https://git.kernel.org/stable/c/6871a676aa534e8f218279672e0445c725f81026 https://git.kernel.org/stable/c/e6bba328578feb58c614c11868c259b40484c5fa https://git.kernel.org/stable/c/fe4a4fc179b7898055555a11685915473588392e https://git.kernel.org/stable/c/ff9d61db59bb27d16d3f872bff2620d50856b80c https://git.kernel.org/stable/c/bd496a44f041da9ef3afe14d1d6193d460424e91