CVE-2026-74269 PUBLISHED

bnxt: fix head underflow on XDP head-grow

Assigner: Linux
Reserved: 15.08.2026 Published: 15.08.2026 Updated: 17.08.2026

In the Linux kernel, the following vulnerability has been resolved:

bnxt: fix head underflow on XDP head-grow

The xdp.py test test_xdp_native_adjst_head_grow_data crashes when run on a bnxt machine (and also crashes in NIPA).

It seems that the bug is an underflow in bnxt_rx_multi_page_skb, which builds the skb head:

napi_build_skb(data_ptr - bp->rx_offset, rxr->rx_page_size);

The problem with this expression is that in page mode, rx_offset is:

bp->rx_offset = NET_IP_ALIGN + XDP_PACKET_HEADROOM;

Which evaluates (at least on x86_64) to 258.

The test test_xdp_native_adjst_head_grow_data tests a case where the head is adjusted by -256.

When this test runs, data_ptr is shifted to frag_start + 2 (where frag_start = page_address(page) + offset).

Then, bnxt_rx_multi_page_skb is invoked and the napi_build_skb expression subtracts 258, landing at an address before frag_start. This could be either the previous fragment or the previous physical page when the offset is < 256 (e.g. if the fragment started at offset 0).

When the skb is freed, the page pool fragment reference is dropped on either the wrong page or the wrong frag of the right page. In either case, the corrupted reference count can lead to the page being prematurely recycled while still in use. Once (incorrectly) recycled, it can be handed out again and on driver teardown this would result in a double free.

The commit under fixes updated this code to handle the case where the native page size is >= 64k, but it unintentionally broke the head grow case.

To fix this, add an offset field to struct bnxt_sw_rx_bd, mirroring the existing offset field in struct bnxt_sw_rx_agg_bd. Populate it on allocation and preserve it on reuse.

In bnxt_rx_multi_page_skb, use the newly added offset field to compute the fragment start and pass that to napi_build_skb. Adjust the layout with skb_reserve.

There are two cases, the non-adjustment case and the adjustment case.

In both cases, the skb is built at page_address(page) + offset to account for the case where the native page size >= 64K and skb_reserve is called with data_ptr - (page_address(page) + offset). That difference equals bp->rx_offset when data_ptr was not moved, or bp->rx_offset + xdp_adjust when XDP adjusted the head.

Re-running the failing test with this commit applied causes the test to run successfully to completion.

The other rx_skb_func implementations don't have this issue.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8

AV:N - The flaw is reached in bnxt hardware RX/NAPI processing when network packets arrive; the reproducing selftest triggers it by exchanging UDP packets over the network after XDP head-grow on receive. AC:L - Once a bnxt interface runs XDP multi-buffer with jumbo MTU, an attacker can reliably trigger bpf_xdp_adjust_head(-256) with packets larger than rx_copybreak (256 bytes); no race or attacker-uncontrollable memory layout is required. PR:N - The vulnerable receive path performs no authentication on incoming packets. Attaching the XDP program and enabling jumbo MTU are deployment preconditions on affected bnxt servers, not privileges the remote attacker needs. UI:N - After the affected bnxt interface is configured with XDP and jumbo MTU, exploitation requires only sending crafted network traffic; no additional victim action such as opening files or mounting filesystems is needed. S:U - Impact is kernel memory corruption and denial of service within the host networking stack. This is standard in-kernel privilege/integrity impact, not a VM escape, IOMMU bypass, or other cross-security-boundary violation. C:H - Pointer underflow builds the skb on the wrong page-pool fragment or prior physical page, corrupting refcount accounting and allowing pages to be recycled while still referenced, yielding a use-after-free that can expose kernel memory. I:H - Corrupted page-pool reference counts can prematurely recycle receive buffers still in use and lead to double-free on teardown, providing exploitable kernel heap memory corruption beyond a simple crash. A:H - The bug crashes bnxt systems during XDP head-grow testing and can be triggered repeatedly via received traffic, causing kernel oops, resource exhaustion, or panic especially when panic_on_warn is enabled.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from f6974b4c2d8e1062b5a52228ee47293c15b4ee1e to bb72b1c6755631c74b7e0878ee55bb81c06776c0 (excl.)
  • affected from f6974b4c2d8e1062b5a52228ee47293c15b4ee1e to e26657fe3b85c068b01f42bb0c602f242d643ba9 (excl.)
  • Version e9f11bfc03fb0d3c86f91b8ae945bb10f7e19c16 is affected
  • Version ae0e135dc900827687ecc684c2bbb57aae48d318 is affected
  • affected from 6.1.45 to 6.2 (excl.)
  • affected from 6.4.10 to 6.5 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.5 is affected
  • unaffected from 0 to 6.5 (excl.)
  • unaffected from 7.1.5 to 7.1.* (incl.)
  • unaffected from 7.2 to * (incl.)

References