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 D22514C98 for ; Wed, 24 Dec 2025 12:29: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=1766579357; cv=none; b=YYE+eaq0CyhAaNSzX4rKMNcAzPB+5zxsYEjttg14sCje4tegF34ptwLDb1FfNG/JAmYPxnYhyIexsbk1K7Mc84SnlNqYPSJln127JLYQUTuBbXKuPk1JI6AdDCm+qqztC7anJb/qVwDbBfmiEX0rK2xt40OT/nYixWPfhprjhds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766579357; c=relaxed/simple; bh=nXWSiQI/fpmIFWT+FabemKlk938MUFdzn6m2++wKL4Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p2U+u/2Y0LGOCJPlHveg62nrHb6RWX81wUIHOndar4Gw3IEv+VvB628NCFb4S1BGmt1DA181N6fevgxkyMEwJpZfG4uzDmEH3dyXo2DlHvqyA1Oqr3YNrvFuG0CZB77B5ooHUc8IhUrVFrSEZpRLAm8UPtWDJG20O98EmtY6P1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Jc9fFjqp; 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="Jc9fFjqp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 107EFC4CEFB; Wed, 24 Dec 2025 12:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766579357; bh=nXWSiQI/fpmIFWT+FabemKlk938MUFdzn6m2++wKL4Q=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Jc9fFjqpc6mZ2u2+onyMW2etfqYZc9BZryhMtqNYSGvHZLQ4W2y4pXxRb0SERw9+Q 5Vo5r+5PjakGDhTtOWI8C99SgPLe1qvY5wM3vLip4Ro24q+I7ZoKQm3p1gWYtNca45 9ApSGbvraUdQIAyd6z+a/sfGNtFSCVWW8+oePirk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54058: firmware: arm_ffa: Check if ffa_driver remove is present before executing Date: Wed, 24 Dec 2025 13:26:51 +0100 Message-ID: <2025122427-CVE-2023-54058-ce20@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=3827; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VvuuweDKcYPnn0DuWhxGIsvpHPTO/jwi2yvg0nvcxqU=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnetz9PZAk4vld0B+tarZC6e9u+rV5SmTdDZk3C399B3 1vvRorWd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE0pIYFsxa2WH3adrKgo7D T6S4tm9Zbbln6zWG+V7rS8puxn5Rdt1wYMeexMVqpeuTlQE= 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: firmware: arm_ffa: Check if ffa_driver remove is present before executing Currently ffa_drv->remove() is called unconditionally from ffa_device_remove(). Since the driver registration doesn't check for it and allows it to be registered without .remove callback, we need to check for the presence of it before executing it from ffa_device_remove() to above a NULL pointer dereference like the one below: | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 | Mem abort info: | ESR = 0x0000000086000004 | EC = 0x21: IABT (current EL), IL = 32 bits | SET = 0, FnV = 0 | EA = 0, S1PTW = 0 | FSC = 0x04: level 0 translation fault | user pgtable: 4k pages, 48-bit VAs, pgdp=0000000881cc8000 | [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 | Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP | CPU: 3 PID: 130 Comm: rmmod Not tainted 6.3.0-rc7 #6 | Hardware name: FVP Base RevC (DT) | pstate: 63402809 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=-c) | pc : 0x0 | lr : ffa_device_remove+0x20/0x2c | Call trace: | 0x0 | device_release_driver_internal+0x16c/0x260 | driver_detach+0x90/0xd0 | bus_remove_driver+0xdc/0x11c | driver_unregister+0x30/0x54 | ffa_driver_unregister+0x14/0x20 | cleanup_module+0x18/0xeec | __arm64_sys_delete_module+0x234/0x378 | invoke_syscall+0x40/0x108 | el0_svc_common+0xb4/0xf0 | do_el0_svc+0x30/0xa4 | el0_svc+0x2c/0x7c | el0t_64_sync_handler+0x84/0xf0 | el0t_64_sync+0x190/0x194 The Linux kernel CVE team has assigned CVE-2023-54058 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 244f5d597e1ea519c2085fbd9819458688775e42 and fixed in 5.15.114 with commit 6a26c62625c59b8dd7f52c518cb4f60a63470a0e Issue introduced in 5.15 with commit 244f5d597e1ea519c2085fbd9819458688775e42 and fixed in 6.1.31 with commit ad73dc7263ea90302d6c7eeb7e9f7cbcfa0b0617 Issue introduced in 5.15 with commit 244f5d597e1ea519c2085fbd9819458688775e42 and fixed in 6.3.5 with commit 48399c297c46b4c8e77ebcf071bb586a42d0ca4e Issue introduced in 5.15 with commit 244f5d597e1ea519c2085fbd9819458688775e42 and fixed in 6.4 with commit b71b55248a580e9c9befc4ae060539f1f8e477da Issue introduced in 5.14.14 with commit 06560ba731e2775441c6dc9f0bf39f9f3606fbb7 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-54058 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/firmware/arm_ffa/bus.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/6a26c62625c59b8dd7f52c518cb4f60a63470a0e https://git.kernel.org/stable/c/ad73dc7263ea90302d6c7eeb7e9f7cbcfa0b0617 https://git.kernel.org/stable/c/48399c297c46b4c8e77ebcf071bb586a42d0ca4e https://git.kernel.org/stable/c/b71b55248a580e9c9befc4ae060539f1f8e477da