CVE-2026-99127: page_pool: keep frag_offset aligned for odd-sized requests
In the Linux kernel, the following vulnerability has been resolved:
pagepool: keep fragoffset aligned for odd-sized requests
pagepoolallocfragnetmem() rounds the requested fragment size with
size = ALIGN(size, dmagetcachealignment());
dmagetcachealignment() returns 1 unless the architecture defines ARCHDMAMINALIGN, which DMA-coherent architectures such as x86 do not. There the ALIGN() is a no-op and pool->fragoffset advances by the raw, unrounded size.
A single caller asking for an odd size then leaves fragoffset misaligned for every fragment carved out of that page afterwards. The pool is shared, so the damage is not confined to the caller that caused it.
The per-cpu systempagepool used by generic XDP hits this. skbppcowdata() allocates its fragments with the raw packet length:
size = mint(u32, len, PAGESIZE); truesize = size; page = pagepooldevalloc(pool, &pageoff, &truesize);
leaving fragoffset odd for whatever is carved out of that page next. Its own head allocation is already aligned -- SKBHEADALIGN(size) plus the XDPPACKETHEADROOM its callers pass -- so it is a later user of the shared pool that pays: pagepooldevallocva() returns a misaligned buffer, napibuildskb() installs it as skb->head, and skbshinfo(skb) == skb->head + skb->end is misaligned with it.
skbshinfo()->dataref is a 4-byte atomict at offset 0x20, so the atomicinc() in skbclone() straddles a cache line. On x86 with split lock detection -- fatal for kernel split locks by default -- this panics the machine:
Oops: Split lock detected RIP: 0010:skbclone+0x154/0x1e0 Call Trace: <IRQ> rawlocaldeliver+0x1ed/0x2c0 ipprotocoldeliverrcu+0x54/0x1c0 iplocaldeliverfinish+0x85/0x100 iplocaldeliver+0x67/0x100 netifreceiveskbonecore+0x85/0xa0 processbacklog+0x87/0x130
Reproduced by attaching any generic-mode XDP program to loopback and opening a RAW IPPROTOUDP socket, which makes rawlocaldeliver() clone every locally delivered UDP packet; ordinary DNS traffic then triggers it, roughly once per 2500 clones. Observed on 6.12.101 and 7.1.8.
Tracing pagepoolallocfragnetmem() over one such run shows the amplification -- two odd-sized requests, nine misaligned offsets:
requested size & 7: 0: 17035 5: 1 7: 1 fragoffset & 7: 0: 17028 3: 1 4: 1 5: 1 6: 1 7: 5
and skbppcowdata() returning heads that were aligned on entry:
head 0xffff8f4c86aeac00 -> 0xffff8f4c53a9a9c4 (&7=4) head 0xffff8f4d6a8a42c0 -> 0xffff8f4c4f7b7a45 (&7=5)
Round the fragment size up to at least the alignment struct skbsharedinfo requires, so fragments are always suitably aligned for the objects callers build on them. Architectures needing a larger DMA alignment keep it.
This also makes the remainder computed in pagepoolallocnetmem(),
size = maxsize - offset;
aligned, since maxsize is a power of two -- which fixes the matching misalignment of skb->end.
Verified with a controlled A/B under QEMU/KVM: same tree, same config, same compiler, same rootfs and identical traffic, differing only by this patch. A SEC("xdp.frags") XDPPASS program on lo plus UDP datagrams larger than maxheadsize drives skbppcowdata()'s fragment loop, which passes raw packet lengths to the pool. Measured at the return of skbppcowdata():
unpatched patched skbppcowdata calls 40800 40800 misaligned skb->head 1120 0 dataref at line offset >60 80 0
The last row counts the accesses that actually fault: skbshinfo()->dataref sits at head+end+0x20 and is a 4-byte atomic, so lock incl splits a 64-byte cache line only when that address lands at offset 61..63. All 80 occurrences were at offset 61; the panic reported above was at offset 62. Eliminating the misalignment removes every one of them.
Same class of bug as commit 3bed3cc4156e ("net: Do not allocate page fragments t ---truncated---
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.224 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.161 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.115 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 6.6.161.1-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
ubuntu/linux-aws-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1121.128~20.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1122.132~20.04.1 - Upgrade
Upgrade
ubuntu/linux-ibm-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1115.119~20.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.15.0-204.214 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.15.0-1121.128 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 5.15.0-1122.132 - Upgrade
Upgrade
ubuntu/linux-gcp-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1074.82~22.04.1 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 5.15.0-1117.123 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 5.15.0-1104.112 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.15.0-1115.119 - Upgrade
Upgrade
ubuntu/linux-ibm-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1070.71~22.04.1 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.15.0-1113.118 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 5.15.0-1118.124 - Upgrade
Upgrade
ubuntu/linux-oracle-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1068.72~22.04.1 - Upgrade
Upgrade
ubuntu/linux-aws-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-1121.128+fips1 - Upgrade
Upgrade
ubuntu/linux-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-204.214+fips1 - Upgrade
Upgrade
ubuntu/linux-gcp-fipsto a version that resolves this vulnerability.Fixed in 5.15.0-1122.132+fips1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.8.0-151.151 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.8.0-1070.76 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.8.0-1074.82 - Upgrade
Upgrade
ubuntu/linux-gcp-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1018.20~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 6.8.0-1069.78 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 6.8.0-1054.58 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 6.8.0-1070.71 - Upgrade
Upgrade
ubuntu/linux-vmwareto a version that resolves this vulnerability.Fixed in 6.8.0-1011.11 - Upgrade
Upgrade
ubuntu/linux-aws-fipsto a version that resolves this vulnerability.Fixed in 6.8.0-1070.76+fips1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-44.44 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1018.19 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1018.20 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 7.0.0-1011.12 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-vmwareto a version that resolves this vulnerability.Fixed in 7.0.0-1007.7 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-1Fixed in 6.12.115-2Fixed in 7.2.13-1 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 0:6.18.62-1.1.azl4 - Compensating control
Round the fragment size up to at least the alignment required by struct skb_shared_info so fragments remain suitably aligned.
Event History
Frequently Asked Questions
Which environments are most exposed to this issue?
DMA-coherent architectures where dma_get_cache_alignment() returns 1 are affected, including x86. The per-CPU system_page_pool used by generic XDP is specifically identified as reaching the vulnerable allocation path.
What condition causes the shared pool to become misaligned?
A caller must request an odd-sized fragment when fragment sizes are not rounded beyond their raw size. skb_pp_cow_data() can do this because it allocates using the raw packet length.
Does the caller that requests the odd-sized fragment necessarily experience the failure?
No. The caller that creates the odd offset can have an already aligned head allocation; a later user of the shared page pool can receive the misaligned allocation instead.
How can I check whether a kernel includes the resolution?
Check whether the kernel incorporates the stable changes referenced by commits 813a72beaa5d3f4bb135e0def9b3f07a3511ca0e, dca1b51693c81eaf77e50980be373e01ae857394, or dc0df5a0c62ccea1d0e08d39a4dc9064de81d411.