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 237F914B804 for ; Sat, 24 Feb 2024 14:57:12 +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=1708786633; cv=none; b=gbw/PvWR1cExvombfGHjk9RXcijDItCpxY0oZaO+QxWX74P1KOfdme2/fasbhCmU0nBWatEZ6VlUxH8ceLUJwNXDSovuFuPfNqKNaBtyv0JNQ6crSr92/lQscepD7NxIqLL5ERE+t7CeOlTa5iUgZ6TwlXYRgPxycdlG6Z5I+yI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708786633; c=relaxed/simple; bh=o0Gm00bx2KbifyblrWkEpCHeYqXeBr1NQHBTGpogCvI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=suP3PMNQpGgXVT6VpggKNeM1kEcLW0KZvQg4SgAmV78V5FClzBKnGNQykDHNd630TvlppaG1WgQ34UcElwWt65Jm05nkSuTlDGbrFKVrA5uduDarv2x3ZYojOUvgVwbJnGWUYRBm5iiLiUWcRrS0hVFEandZhpuNGYfVWfViIlg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JEplfurd; 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="JEplfurd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 272ADC433C7; Sat, 24 Feb 2024 14:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708786632; bh=o0Gm00bx2KbifyblrWkEpCHeYqXeBr1NQHBTGpogCvI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JEplfurdJOYdpfmY6+qOKJKPKNJg4fxD7g7QrV89Rld2wM89ceBAa8fDlJAfqcBSp Lv9bEEBTt5OIzkOk/tfx7sUhnkRHXglLmnwKkPj+2evQxt559GtbBFRd7rdgezZyFa n/iauxJ6/uOKmJenG0petKgVI9MDY6auLHXbRJs4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26600: phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP Date: Sat, 24 Feb 2024 15:57:05 +0100 Message-ID: <2024022405-CVE-2024-26600-44a2@gregkh> X-Mailer: git-send-email 2.44.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=4100; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=o0Gm00bx2KbifyblrWkEpCHeYqXeBr1NQHBTGpogCvI=; b=owGbwMvMwCRo6H6F97bub03G02pJDKm3mA8eb2wrPubyTT7wvJfJ0eWfHHn3up8TvK6xvdfsg LuvymXljlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhI9UeG+W7Pmy5+MA/IPXa7 SOtLpFL5n9qJEgzzCxNev5QvUwvb5yGi9uFQ7te1afaeAA== 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: phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP If the external phy working together with phy-omap-usb2 does not implement send_srp(), we may still attempt to call it. This can happen on an idle Ethernet gadget triggering a wakeup for example: configfs-gadget.g1 gadget.0: ECM Suspend configfs-gadget.g1 gadget.0: Port suspended. Triggering wakeup ... Unable to handle kernel NULL pointer dereference at virtual address 00000000 when execute ... PC is at 0x0 LR is at musb_gadget_wakeup+0x1d4/0x254 [musb_hdrc] ... musb_gadget_wakeup [musb_hdrc] from usb_gadget_wakeup+0x1c/0x3c [udc_core] usb_gadget_wakeup [udc_core] from eth_start_xmit+0x3b0/0x3d4 [u_ether] eth_start_xmit [u_ether] from dev_hard_start_xmit+0x94/0x24c dev_hard_start_xmit from sch_direct_xmit+0x104/0x2e4 sch_direct_xmit from __dev_queue_xmit+0x334/0xd88 __dev_queue_xmit from arp_solicit+0xf0/0x268 arp_solicit from neigh_probe+0x54/0x7c neigh_probe from __neigh_event_send+0x22c/0x47c __neigh_event_send from neigh_resolve_output+0x14c/0x1c0 neigh_resolve_output from ip_finish_output2+0x1c8/0x628 ip_finish_output2 from ip_send_skb+0x40/0xd8 ip_send_skb from udp_send_skb+0x124/0x340 udp_send_skb from udp_sendmsg+0x780/0x984 udp_sendmsg from __sys_sendto+0xd8/0x158 __sys_sendto from ret_fast_syscall+0x0/0x58 Let's fix the issue by checking for send_srp() and set_vbus() before calling them. For USB peripheral only cases these both could be NULL. The Linux kernel CVE team has assigned CVE-2024-26600 to this issue. Affected and fixed versions =========================== Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 4.19.307 with commit 486218c11e8d Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 5.4.269 with commit 8398d8d735ee Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 5.10.210 with commit be3b82e4871b Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 5.15.149 with commit 8cc889b9dea0 Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 6.1.78 with commit 0430bfcd4665 Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 6.6.17 with commit 14ef61594a5a Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 6.7.5 with commit 396e17af6761 Issue introduced in 3.7 with commit 657b306a7bdf and fixed in 6.8-rc3 with commit 7104ba0f1958 Please see https://www.kernel.org or 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-2024-26600 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/phy/ti/phy-omap-usb2.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/486218c11e8d1c8f515a3bdd70d62203609d4b6b https://git.kernel.org/stable/c/8398d8d735ee93a04fb9e9f490e8cacd737e3bf5 https://git.kernel.org/stable/c/be3b82e4871ba00e9b5d0ede92d396d579d7b3b3 https://git.kernel.org/stable/c/8cc889b9dea0579726be9520fcc766077890b462 https://git.kernel.org/stable/c/0430bfcd46657d9116a26cd377f112cbc40826a4 https://git.kernel.org/stable/c/14ef61594a5a286ae0d493b8acbf9eac46fd04c4 https://git.kernel.org/stable/c/396e17af6761b3cc9e6e4ca94b4de7f642bfece1 https://git.kernel.org/stable/c/7104ba0f1958adb250319e68a15eff89ec4fd36d