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 4F8AEF9D9 for ; Wed, 16 Apr 2025 14:18:14 +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=1744813096; cv=none; b=XFdpRMgCMlXQ4EBIB4fe5FwQ0CqbWyMyy+R++kredBMErgJhIJSPiWbGttEav6dxh5+LXhhBB7kDA8tZOfvg8+1oHDIM3M8lvTESfpDOqJVlT0EulXtegqQhw9V/LYoICXDkO7B6gy8lrUpLBI/pj4CGgcpJLlTWJw+fNvczPo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744813096; c=relaxed/simple; bh=lD3jXWBAHABSQYtmvmto1MGNtLAfxdR3v2jZZAExn68=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HyUl5aNorcEytH1028S3S36ZWCnGKEdJpcB46sxHvTDAE9PktdE/Gbe+u4AWAOyxNaxBzonBEniYBrDRZYXOQ5y1kJ2x+FneMj9tXL6medfximJxfGnF5/qX6bfpXANHhX97etkqXSBa6QrVqMsj1Wm2USn5wzRV6ogoCN2H1ls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qIzq7PrI; 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="qIzq7PrI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AC07C4CEE2; Wed, 16 Apr 2025 14:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744813094; bh=lD3jXWBAHABSQYtmvmto1MGNtLAfxdR3v2jZZAExn68=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qIzq7PrIDWSVAOiL4cE+XvSFKaLjVRT7GcWXbqotl2vl42PVCPqKDLWS3q41zqmh3 /+o2HotNLyp9utB0pL5BaPsV721GnHE+IgMMbt6oF1M+DusgQgoWU1dzRsM1+IL640 6b06fQhxElUhU31H4tUJpkq3R746wEVY2vpc5VG8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22116: idpf: check error for register_netdev() on init Date: Wed, 16 Apr 2025 16:13:27 +0200 Message-ID: <2025041626-CVE-2025-22116-a2f7@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=2842; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lD3jXWBAHABSQYtmvmto1MGNtLAfxdR3v2jZZAExn68=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d53KupV0/8nE1o33J5+awHW0tfSJ0/op0ty37tYtu TtpUkb9nY5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYSDsnw4IjvlKqk2qYj/Tk TzTz1DDIPGEZ4s2wYI2A8rFPJxWPFQe/+2g2y3TLrotsQQA= 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: idpf: check error for register_netdev() on init Current init logic ignores the error code from register_netdev(), which will cause WARN_ON() on attempt to unregister it, if there was one, and there is no info for the user that the creation of the netdev failed. WARNING: CPU: 89 PID: 6902 at net/core/dev.c:11512 unregister_netdevice_many_notify+0x211/0x1a10 ... [ 3707.563641] unregister_netdev+0x1c/0x30 [ 3707.563656] idpf_vport_dealloc+0x5cf/0xce0 [idpf] [ 3707.563684] idpf_deinit_task+0xef/0x160 [idpf] [ 3707.563712] idpf_vc_core_deinit+0x84/0x320 [idpf] [ 3707.563739] idpf_remove+0xbf/0x780 [idpf] [ 3707.563769] pci_device_remove+0xab/0x1e0 [ 3707.563786] device_release_driver_internal+0x371/0x530 [ 3707.563803] driver_detach+0xbf/0x180 [ 3707.563816] bus_remove_driver+0x11b/0x2a0 [ 3707.563829] pci_unregister_driver+0x2a/0x250 Introduce an error check and log the vport number and error code. On removal make sure to check VPORT_REG_NETDEV flag prior to calling unregister and free on the netdev. Add local variables for idx, vport_config and netdev for readability. The Linux kernel CVE team has assigned CVE-2025-22116 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 0fe45467a1041ea3657a7fa3a791c84c104fbd34 and fixed in 6.14.2 with commit 89768e33752211b2240ec4c34138170c95f11f97 Issue introduced in 6.7 with commit 0fe45467a1041ea3657a7fa3a791c84c104fbd34 and fixed in 6.15-rc1 with commit 680811c67906191b237bbafe7dabbbad64649b39 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-22116 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/ethernet/intel/idpf/idpf_lib.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/89768e33752211b2240ec4c34138170c95f11f97 https://git.kernel.org/stable/c/680811c67906191b237bbafe7dabbbad64649b39