{"id":"CVE-2025-39971","state":"PUBLISHED","title":"i40e: fix idx validation in config queues msg","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ni40e: fix idx validation in config queues msg\n\nEnsure idx is within range of active/initialized TCs when iterating over\nvf->ch[idx] in i40e_vc_config_queues_msg().","publishedAt":"2025-10-15T07:55:54.270Z","updatedAt":"2026-08-05T12:06:40.599Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"a6ff2af78343eceb0f77ab1a2fe802183bc21648","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"f5f91d164af22e7147130ef8bebbdb28d8ecc6e2","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"1fa0aadade34481c567cdf4a897c0d4e4d548bd1","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"8b9c7719b0987b1c6c5fc910599f3618a558dbde","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"2cc26dac0518d2fa9b67ec813ee60e183480f98a","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"bfcc1dff429d4b99ba03e40ddacc68ea4be2b32b","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"5c1f96123113e0bdc6d8dc2b0830184c93da9f65","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"f1ad24c5abe1eaef69158bac1405a74b3c365115","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"5.4.300","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.245","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.194","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.155","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.109","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.50","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.10","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c"]}],"references":["https://git.kernel.org/stable/c/a6ff2af78343eceb0f77ab1a2fe802183bc21648","https://git.kernel.org/stable/c/f5f91d164af22e7147130ef8bebbdb28d8ecc6e2","https://git.kernel.org/stable/c/1fa0aadade34481c567cdf4a897c0d4e4d548bd1","https://git.kernel.org/stable/c/8b9c7719b0987b1c6c5fc910599f3618a558dbde","https://git.kernel.org/stable/c/2cc26dac0518d2fa9b67ec813ee60e183480f98a","https://git.kernel.org/stable/c/bfcc1dff429d4b99ba03e40ddacc68ea4be2b32b","https://git.kernel.org/stable/c/5c1f96123113e0bdc6d8dc2b0830184c93da9f65","https://git.kernel.org/stable/c/f1ad24c5abe1eaef69158bac1405a74b3c365115"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/39xxx/CVE-2025-39971.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39971","state":"PUBLISHED","datePublished":"2025-10-15T07:55:54.270Z","dateUpdated":"2026-08-05T12:06:40.599Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.149Z"},"containers":{"cna":{"title":"i40e: fix idx validation in config queues msg","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ni40e: fix idx validation in config queues msg\n\nEnsure idx is within range of active/initialized TCs when iterating over\nvf->ch[idx] in i40e_vc_config_queues_msg()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"a6ff2af78343eceb0f77ab1a2fe802183bc21648","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"f5f91d164af22e7147130ef8bebbdb28d8ecc6e2","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"1fa0aadade34481c567cdf4a897c0d4e4d548bd1","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"8b9c7719b0987b1c6c5fc910599f3618a558dbde","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"2cc26dac0518d2fa9b67ec813ee60e183480f98a","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"bfcc1dff429d4b99ba03e40ddacc68ea4be2b32b","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"5c1f96123113e0bdc6d8dc2b0830184c93da9f65","versionType":"git"},{"version":"c27eac48160de72dee33d42b5a33cc7b8a2eb1f5","status":"affected","lessThan":"f1ad24c5abe1eaef69158bac1405a74b3c365115","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"5.4.300","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.245","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.194","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.155","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.109","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.50","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.10","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a6ff2af78343eceb0f77ab1a2fe802183bc21648"},{"url":"https://git.kernel.org/stable/c/f5f91d164af22e7147130ef8bebbdb28d8ecc6e2"},{"url":"https://git.kernel.org/stable/c/1fa0aadade34481c567cdf4a897c0d4e4d548bd1"},{"url":"https://git.kernel.org/stable/c/8b9c7719b0987b1c6c5fc910599f3618a558dbde"},{"url":"https://git.kernel.org/stable/c/2cc26dac0518d2fa9b67ec813ee60e183480f98a"},{"url":"https://git.kernel.org/stable/c/bfcc1dff429d4b99ba03e40ddacc68ea4be2b32b"},{"url":"https://git.kernel.org/stable/c/5c1f96123113e0bdc6d8dc2b0830184c93da9f65"},{"url":"https://git.kernel.org/stable/c/f1ad24c5abe1eaef69158bac1405a74b3c365115"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The malicious input arrives as a `VIRTCHNL_OP_CONFIG_VSI_QUEUES` message on the SR-IOV VF→PF admin-queue mailbox, a PCIe transport, not a network protocol. The attacker needs local control of an assigned VF (guest VM or VF-owning container), so this is local reachability rather than network or adjacent.\nAC:L - The attacker fully controls every input — `num_tc` and per-TC `count` via ENABLE_CHANNELS, then `num_queue_pairs` and the qpair array via CONFIG_VSI_QUEUES — so shrinking `num_tc` to leave stale `ch[]` entries and then walking `idx` into them is deterministic on the first attempt with no memory grooming or race. The only precondition, spoofchk disabled, is inherent to any ADq-enabled SR-IOV deployment and is a standard runtime configuration.\nPR:L - The attacker only needs to drive the VF's admin queue — kernel/root inside the assigned guest, or possession of the VFIO device — which is a low-privileged position relative to the host PF driver under attack. No privileges of any kind on the host are required.\nUI:N - The malicious VF sends the virtchnl message sequence entirely on its own initiative. No host administrator or other user action is needed at any stage.\nS:C - The attacking VF sits in a guest VM (or VF-assigned container) while the stale-index read and the resulting hardware queue-context programming occur in the host PF driver's security authority. The corrupted resources — HMC LAN Tx/Rx contexts and QTX_CTL bindings of VSIs belonging to the PF or to other VFs — are outside the attacker's scope, crossing the guest/host and inter-tenant SR-IOV boundary.\nC:H - Using a stale `ch[idx].vsi_id`, the VF resolves and reprograms the Rx queue context of a VSI it does not own, setting `rx_ctx.base` from its own `dma_ring_addr` so another VSI's received traffic is DMA'd into attacker-designated memory — interception of host and cross-guest traffic. On pre-5.2 kernels the same defect additionally reads past the end of `vf->ch[]` into adjacent `struct i40e_vf` state.\nI:H - `i40e_config_vsi_rx_queue()` performs no ownership check and `i40e_config_vsi_tx_queue()` validates only the VF-supplied `info->vsi_id`, so the stale ID lets the VF clear and rewrite the LAN HMC Tx/Rx contexts of a foreign VSI's queues and issue a `QTX_CTL` write rebinding that PF queue to itself. This is attacker-controlled modification of host- and peer-owned hardware state.\nA:H - Clearing and rewriting queue contexts belonging to the PF's main VSI or another guest's VSI stalls or wedges those queues, and out-of-range `pf_queue_id` values (`I40E_QUEUE_END_OF_LIST`) drive HMC operations that trigger adapter error paths, PF/VF reset storms and loss of host networking. The VF can repeat the sequence at will, and a downed host PF takes every guest on the adapter with it."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:06:40.599Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"5.4.300"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"5.10.245"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"5.15.194"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.1.155"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.6.109"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.12.50"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.16.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-16T15:52:18.829458Z","id":"CVE-2025-39971","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-16T15:52:31.898Z"}}]}}}