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 E7401218584 for ; Thu, 27 Mar 2025 14:59:31 +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=1743087572; cv=none; b=adJipzFcoZevAYVf57qKPdMSrNDBwreiscSa2mGtJPhgoeMGbqaGVcABZzgWLySIZDmS33yRi+S/MnZTZ2nFiDdfJcHQuH4jVeG5B+rkG7x2xQJBDRYMpjs59qgP21C7ZvfUFZFT9iKKNZqfibRhHpx6bbfFI1dc4InzgGv0+jg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743087572; c=relaxed/simple; bh=ftZmWjj/v1iMvgCInm/xN7/Bf0wRTtAjfsNHHTLOtKE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EYowQ73MG2iTUmLT0YvCvcv64w2+8Stme3TBuRQQTZRb8MBqIaI3Iu92rYDbNoLzWMcaGsYK8rtjSjGwRX1vTZdRrZdMlUwXPnyOBzdcGjGXex18psvJl2fZKnTgKVuJ4VL2tIYVdT+f/TWWVgiKVGm8ikMWCZ7WmoutJsD/CYE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TMOhWq+y; 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="TMOhWq+y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B00DC4CEDD; Thu, 27 Mar 2025 14:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743087571; bh=ftZmWjj/v1iMvgCInm/xN7/Bf0wRTtAjfsNHHTLOtKE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TMOhWq+yD/OJHCSzn/aYdHKxeYC4Bue67SlZGtICf2EQzVOpI2KYNs/q4+gxTgVgw 9o6Gl3ffePakECQ4EiRkht5l2E0PZxox+UItwrahbJJpF85I/O7r2VdV7RnAVQjiNZ 0o7mUHONPb2OajbIAVM9tgxP5Kb3jRYy3qYiNwKE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21877: usbnet: gl620a: fix endpoint checking in genelink_bind() Date: Thu, 27 Mar 2025 15:58:11 +0100 Message-ID: <2025032711-CVE-2025-21877-de70@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=5962; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ftZmWjj/v1iMvgCInm/xN7/Bf0wRTtAjfsNHHTLOtKE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlP05svsf2PaUt8HBBxUIitNGiTfM2tS12Hpj087nz2i rP356lTO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiB9IZ5ntYHvvrLL2xI7mG TyDaIeFv4C4XaYYFU6u/T27rSW86Jnap4/rTZ3kX6u7eBQA= 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: usbnet: gl620a: fix endpoint checking in genelink_bind() Syzbot reports [1] a warning in usb_submit_urb() triggered by inconsistencies between expected and actually present endpoints in gl620a driver. Since genelink_bind() does not properly verify whether specified eps are in fact provided by the device, in this case, an artificially manufactured one, one may get a mismatch. Fix the issue by resorting to a usbnet utility function usbnet_get_endpoints(), usually reserved for this very problem. Check for endpoints and return early before proceeding further if any are missing. [1] Syzbot report: usb 5-1: Manufacturer: syz usb 5-1: SerialNumber: syz usb 5-1: config 0 descriptor?? gl620a 5-1:0.23 usb0: register 'gl620a' at usb-dummy_hcd.0-1, ... ------------[ cut here ]------------ usb 5-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 2 PID: 1841 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Modules linked in: CPU: 2 UID: 0 PID: 1841 Comm: kworker/2:2 Not tainted 6.12.0-syzkaller-07834-g06afb0f36106 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: mld mld_ifc_work RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 ... Call Trace: usbnet_start_xmit+0x6be/0x2780 drivers/net/usb/usbnet.c:1467 __netdev_start_xmit include/linux/netdevice.h:5002 [inline] netdev_start_xmit include/linux/netdevice.h:5011 [inline] xmit_one net/core/dev.c:3590 [inline] dev_hard_start_xmit+0x9a/0x7b0 net/core/dev.c:3606 sch_direct_xmit+0x1ae/0xc30 net/sched/sch_generic.c:343 __dev_xmit_skb net/core/dev.c:3827 [inline] __dev_queue_xmit+0x13d4/0x43e0 net/core/dev.c:4400 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_resolve_output net/core/neighbour.c:1514 [inline] neigh_resolve_output+0x5bc/0x950 net/core/neighbour.c:1494 neigh_output include/net/neighbour.h:539 [inline] ip6_finish_output2+0xb1b/0x2070 net/ipv6/ip6_output.c:141 __ip6_finish_output net/ipv6/ip6_output.c:215 [inline] ip6_finish_output+0x3f9/0x1360 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x1f8/0x540 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:450 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] mld_sendpack+0x9f0/0x11d0 net/ipv6/mcast.c:1819 mld_send_cr net/ipv6/mcast.c:2120 [inline] mld_ifc_work+0x740/0xca0 net/ipv6/mcast.c:2651 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The Linux kernel CVE team has assigned CVE-2025-21877 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 5.4.291 with commit 5f2dbabbce04b1ffcd6d8d07564adb94db577536 Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 5.10.235 with commit 24dd971104057c8828d420a48e0a5af6e6f30d3e Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 5.15.179 with commit 9bcb8cbc3e5d67eb223bfb7e2291a270dbb699dc Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 6.1.130 with commit 67ebc3391c8377738e97a43374054d9718fdb6e4 Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 6.6.81 with commit a2ee5e55b50a97d13617c8653482c0ad4decff8c Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 6.12.18 with commit 4e8b8d43373bf837be159366f0192502f97ec7a5 Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 6.13.6 with commit ded25730c96949cb8b048b29c557e38569124943 Issue introduced in 2.6.14 with commit 47ee3051c856cc2aa95d35d577a8cb37279d540f and fixed in 6.14 with commit 1cf9631d836b289bd5490776551961c883ae8a4f 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-21877 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/net/usb/gl620a.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/5f2dbabbce04b1ffcd6d8d07564adb94db577536 https://git.kernel.org/stable/c/24dd971104057c8828d420a48e0a5af6e6f30d3e https://git.kernel.org/stable/c/9bcb8cbc3e5d67eb223bfb7e2291a270dbb699dc https://git.kernel.org/stable/c/67ebc3391c8377738e97a43374054d9718fdb6e4 https://git.kernel.org/stable/c/a2ee5e55b50a97d13617c8653482c0ad4decff8c https://git.kernel.org/stable/c/4e8b8d43373bf837be159366f0192502f97ec7a5 https://git.kernel.org/stable/c/ded25730c96949cb8b048b29c557e38569124943 https://git.kernel.org/stable/c/1cf9631d836b289bd5490776551961c883ae8a4f