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 EE636334C22 for ; Wed, 24 Dec 2025 12:28:48 +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=1766579329; cv=none; b=CW6pJ5p9StO22pZKSph0PHseUtCVDbjH85wi40EVxVcy3JZeQlHQGXDPROlnvxzyiQxKcuo9WJnh3HMr7h4kkBS2v3xDLJN88JzxQkRVyEoFzx+TNGpoiyvBYnx47TmoUz8eZcxs37KF370RVscLiC9/k1qIXfbSJdc+gx59xrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766579329; c=relaxed/simple; bh=LDAoz0uRL2pCbUtu7FEHugNtUaoSmR1emR5CbSy74Qg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TmZ9OcthsPn59li5gmkyKd7Gx7g+0gCXu0vDDpFDC5JOJpSrzTvFNJVx4jnOSBtp1c1U2nNuRpgxGLktFn3jxMIx5eBWLz2SIyyKe3wxxSLK+7CtcuVcUILr6DALA+wZL1V62vhqVnzhqB/c6G0/3oIAqpGsgqZxagZmmhmAlxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dt5tETe5; 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="dt5tETe5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 770F7C116D0; Wed, 24 Dec 2025 12:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766579328; bh=LDAoz0uRL2pCbUtu7FEHugNtUaoSmR1emR5CbSy74Qg=; h=From:To:Cc:Subject:Date:Reply-To:From; b=dt5tETe5B+K/5gvlJqQQi5I0PHRhP7KjgqMQzeEl3yfG1w3F2zrzwWQrgsjo5bZGS eKgvOHwfu8L2vKHU7CHsRkNK0tOVoiEYKqSzBryzJ38NenulFm+2X8q/pTE2KWUfMB QXmWCF+zcV2w9k9VB4u5nWn1zWWCal9e3a94WvXU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54070: igb: clean up in all error paths when enabling SR-IOV Date: Wed, 24 Dec 2025 13:27:03 +0100 Message-ID: <2025122431-CVE-2023-54070-6104@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=5298; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nzQeoz1metyUH0jEvt9aC7pb0uHy9hhmsWOki6y2JW0=; b=kA0DAAIRMUfUDdst+ykByyZiAGlL2/egZzgymr1xmQTAiDeMJrLtUyNEG014J4JU85KVp20yH IhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmlL2/cACgkQMUfUDdst+ylbgwCfcH+4 FfgKyoy6cSdRvdRjEaf2UXsAnjkUHPrjluyLKUmTm76+CRxuHMoR 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: igb: clean up in all error paths when enabling SR-IOV After commit 50f303496d92 ("igb: Enable SR-IOV after reinit"), removing the igb module could hang or crash (depending on the machine) when the module has been loaded with the max_vfs parameter set to some value != 0. In case of one test machine with a dual port 82580, this hang occurred: [ 232.480687] igb 0000:41:00.1: removed PHC on enp65s0f1 [ 233.093257] igb 0000:41:00.1: IOV Disabled [ 233.329969] pcieport 0000:40:01.0: AER: Multiple Uncorrected (Non-Fatal) err0 [ 233.340302] igb 0000:41:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fata) [ 233.352248] igb 0000:41:00.0: device [8086:1516] error status/mask=00100000 [ 233.361088] igb 0000:41:00.0: [20] UnsupReq (First) [ 233.368183] igb 0000:41:00.0: AER: TLP Header: 40000001 0000040f cdbfc00c c [ 233.376846] igb 0000:41:00.1: PCIe Bus Error: severity=Uncorrected (Non-Fata) [ 233.388779] igb 0000:41:00.1: device [8086:1516] error status/mask=00100000 [ 233.397629] igb 0000:41:00.1: [20] UnsupReq (First) [ 233.404736] igb 0000:41:00.1: AER: TLP Header: 40000001 0000040f cdbfc00c c [ 233.538214] pci 0000:41:00.1: AER: can't recover (no error_detected callback) [ 233.538401] igb 0000:41:00.0: removed PHC on enp65s0f0 [ 233.546197] pcieport 0000:40:01.0: AER: device recovery failed [ 234.157244] igb 0000:41:00.0: IOV Disabled [ 371.619705] INFO: task irq/35-aerdrv:257 blocked for more than 122 seconds. [ 371.627489] Not tainted 6.4.0-dirty #2 [ 371.632257] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this. [ 371.641000] task:irq/35-aerdrv state:D stack:0 pid:257 ppid:2 f0 [ 371.650330] Call Trace: [ 371.653061] [ 371.655407] __schedule+0x20e/0x660 [ 371.659313] schedule+0x5a/0xd0 [ 371.662824] schedule_preempt_disabled+0x11/0x20 [ 371.667983] __mutex_lock.constprop.0+0x372/0x6c0 [ 371.673237] ? __pfx_aer_root_reset+0x10/0x10 [ 371.678105] report_error_detected+0x25/0x1c0 [ 371.682974] ? __pfx_report_normal_detected+0x10/0x10 [ 371.688618] pci_walk_bus+0x72/0x90 [ 371.692519] pcie_do_recovery+0xb2/0x330 [ 371.696899] aer_process_err_devices+0x117/0x170 [ 371.702055] aer_isr+0x1c0/0x1e0 [ 371.705661] ? __set_cpus_allowed_ptr+0x54/0xa0 [ 371.710723] ? __pfx_irq_thread_fn+0x10/0x10 [ 371.715496] irq_thread_fn+0x20/0x60 [ 371.719491] irq_thread+0xe6/0x1b0 [ 371.723291] ? __pfx_irq_thread_dtor+0x10/0x10 [ 371.728255] ? __pfx_irq_thread+0x10/0x10 [ 371.732731] kthread+0xe2/0x110 [ 371.736243] ? __pfx_kthread+0x10/0x10 [ 371.740430] ret_from_fork+0x2c/0x50 [ 371.744428] The reproducer was a simple script: #!/bin/sh for i in `seq 1 5`; do modprobe -rv igb modprobe -v igb max_vfs=1 sleep 1 modprobe -rv igb done It turned out that this could only be reproduce on 82580 (quad and dual-port), but not on 82576, i350 and i210. Further debugging showed that igb_enable_sriov()'s call to pci_enable_sriov() is failing, because dev->is_physfn is 0 on 82580. Prior to commit 50f303496d92 ("igb: Enable SR-IOV after reinit"), igb_enable_sriov() jumped into the "err_out" cleanup branch. After this commit it only returned the error code. So the cleanup didn't take place, and the incorrect VF setup in the igb_adapter structure fooled the igb driver into assuming that VFs have been set up where no VF actually existed. Fix this problem by cleaning up again if pci_enable_sriov() fails. The Linux kernel CVE team has assigned CVE-2023-54070 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit 50f303496d92e25b79bdfb73e3707ad0684ad67f and fixed in 6.5.4 with commit 0e3ea7e82a06014b9baf1b84ba579c38cbff3558 Issue introduced in 6.3 with commit 50f303496d92e25b79bdfb73e3707ad0684ad67f and fixed in 6.6 with commit bc6ed2fa24b14e40e1005488bbe11268ce7108fa 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-54070 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/igb/igb_main.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/0e3ea7e82a06014b9baf1b84ba579c38cbff3558 https://git.kernel.org/stable/c/bc6ed2fa24b14e40e1005488bbe11268ce7108fa