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 1937928313F for ; Wed, 18 Jun 2025 11:06:40 +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=1750244801; cv=none; b=A83EaBd1vvvl6yh2o/HlJZzVOwxgABS61NUDqwtGh7jS8EXugqMVbT90fOvPK/DTy7Gh7BAnzgjgEwlgkVkISS6uUXUNn2EFvOpR09h7IrwrK3xn9Grf2ZrNB2Gs4EUPLtazK4CSZWExNcKwNLptoZvGsAxQ6eYqMbt3A7RDOWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244801; c=relaxed/simple; bh=iFkHJ4svYRjEgQHJ5KLOCPmoENXcJDvT2zii6r29Xfc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Xk09PVs+N4ADPpA4U/VcrMVSrVxhW1h9ps+DiwWEBWvYlexn2ERFAD6XH5TtBx/fnvhgk1wuhHIHoOYy1VZ0npyjxP8FgVpJkfP0cJZjKs7JgLKVgl8lc7dZx/LMB0/+P9OaWzvfQ+jyBSxWIEDxNnanUEk61s0bMFkkQ0TQnII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nmZ3kSZT; 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="nmZ3kSZT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3534AC4CEE7; Wed, 18 Jun 2025 11:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244800; bh=iFkHJ4svYRjEgQHJ5KLOCPmoENXcJDvT2zii6r29Xfc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nmZ3kSZTgLcwuHEKCih+bSTkGI9MlxsVx4dr77I0ME8xYSi4fcgwYJg8WfJ9lAXrl uWaA8TiANuaddsi55TTtjLRiod78KmRSav2ua2SHw5zEvFRO++GCYnz214UmvM6ex4 oMxz7IjRUoOlnjZ1N+D5ov75dDKMMuYQVf4zjsTQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50041: ice: Fix call trace with null VSI during VF reset Date: Wed, 18 Jun 2025 13:01:46 +0200 Message-ID: <2025061842-CVE-2022-50041-0e33@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=5261; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Y59spoP8LLCeoH39OIJQx5p3lVgpQqZTMjjbI9UOhyg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc6KWP4pYr/f40d5NYVdz1Reo5nYd5Jr0/DWX8/Kih 4XfwlWTOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiB4sZFqx+6HtOf9OhHcYK IsYaSjxqB9rZXzPMM9fMlpz75f7rK3c3qNZ3mkRue9ueAgA= 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: ice: Fix call trace with null VSI during VF reset During stress test with attaching and detaching VF from KVM and simultaneously changing VFs spoofcheck and trust there was a call trace in ice_reset_vf that VF's VSI is null. [145237.352797] WARNING: CPU: 46 PID: 840629 at drivers/net/ethernet/intel/ice/ice_vf_lib.c:508 ice_reset_vf+0x3d6/0x410 [ice] [145237.352851] Modules linked in: ice(E) vfio_pci vfio_pci_core vfio_virqfd vfio_iommu_type1 vfio iavf dm_mod xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink tun bridge stp llc sunrpc intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm iTCO_wdt iTC O_vendor_support irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel rapl ipmi_si intel_cstate ipmi_devintf joydev intel_uncore m ei_me ipmi_msghandler i2c_i801 pcspkr mei lpc_ich ioatdma i2c_smbus acpi_pad acpi_power_meter ip_tables xfs libcrc32c i2c_algo_bit drm_sh mem_helper drm_kms_helper sd_mod t10_pi crc64_rocksoft syscopyarea crc64 sysfillrect sg sysimgblt fb_sys_fops drm i40e ixgbe ahci libahci libata crc32c_intel mdio dca wmi fuse [last unloaded: ice] [145237.352917] CPU: 46 PID: 840629 Comm: kworker/46:2 Tainted: G S W I E 5.19.0-rc6+ #24 [145237.352921] Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [145237.352923] Workqueue: ice ice_service_task [ice] [145237.352948] RIP: 0010:ice_reset_vf+0x3d6/0x410 [ice] [145237.352984] Code: 30 ec f3 cc e9 28 fd ff ff 0f b7 4b 50 48 c7 c2 48 19 9c c0 4c 89 ee 48 c7 c7 30 fe 9e c0 e8 d1 21 9d cc 31 c0 e9 a 9 fe ff ff <0f> 0b b8 ea ff ff ff e9 c1 fc ff ff 0f 0b b8 fb ff ff ff e9 91 fe [145237.352987] RSP: 0018:ffffb453e257fdb8 EFLAGS: 00010246 [145237.352990] RAX: ffff8bd0040181c0 RBX: ffff8be68db8f800 RCX: 0000000000000000 [145237.352991] RDX: 000000000000ffff RSI: 0000000000000000 RDI: ffff8be68db8f800 [145237.352993] RBP: ffff8bd0040181c0 R08: 0000000000001000 R09: ffff8bcfd520e000 [145237.352995] R10: 0000000000000000 R11: 00008417b5ab0bc0 R12: 0000000000000005 [145237.352996] R13: ffff8bcee061c0d0 R14: ffff8bd004019640 R15: 0000000000000000 [145237.352998] FS: 0000000000000000(0000) GS:ffff8be5dfb00000(0000) knlGS:0000000000000000 [145237.353000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [145237.353002] CR2: 00007fd81f651d68 CR3: 0000001a0fe10001 CR4: 00000000001726e0 [145237.353003] Call Trace: [145237.353008] [145237.353011] ice_process_vflr_event+0x8d/0xb0 [ice] [145237.353049] ice_service_task+0x79f/0xef0 [ice] [145237.353074] process_one_work+0x1c8/0x390 [145237.353081] ? process_one_work+0x390/0x390 [145237.353084] worker_thread+0x30/0x360 [145237.353087] ? process_one_work+0x390/0x390 [145237.353090] kthread+0xe8/0x110 [145237.353094] ? kthread_complete_and_exit+0x20/0x20 [145237.353097] ret_from_fork+0x22/0x30 [145237.353103] Remove WARN_ON() from check if VSI is null in ice_reset_vf. Add "VF is already removed\n" in dev_dbg(). This WARN_ON() is unnecessary and causes call trace, despite that call trace, driver still works. There is no need for this warn because this piece of code is responsible for disabling VF's Tx/Rx queues when VF is disabled, but when VF is already removed there is no need to do reset or disable queues. The Linux kernel CVE team has assigned CVE-2022-50041 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit efe41860008e57fb6b69855b4b93fdf34bc42798 and fixed in 5.19.4 with commit af1b0d1547dd1686ae842cac7f3678649a5cbd89 Issue introduced in 5.19 with commit efe41860008e57fb6b69855b4b93fdf34bc42798 and fixed in 6.0 with commit cf90b74341eecc32ceef0c136954a1668e43b1e7 Issue introduced in 5.18.6 with commit 1bb8253b1dd44cf004e12c333acc6f25ee286cf3 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-2022-50041 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/ice/ice_vf_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/af1b0d1547dd1686ae842cac7f3678649a5cbd89 https://git.kernel.org/stable/c/cf90b74341eecc32ceef0c136954a1668e43b1e7