{"id":"CVE-2026-99127","state":"PUBLISHED","title":"page_pool: keep frag_offset aligned for odd-sized requests","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npage_pool: keep frag_offset aligned for odd-sized requests\n\npage_pool_alloc_frag_netmem() rounds the requested fragment size with\n\n\tsize = ALIGN(size, dma_get_cache_alignment());\n\ndma_get_cache_alignment() returns 1 unless the architecture defines\nARCH_DMA_MINALIGN, which DMA-coherent architectures such as x86 do not.\nThere the ALIGN() is a no-op and pool->frag_offset advances by the raw,\nunrounded size.\n\nA single caller asking for an odd size then leaves frag_offset misaligned\nfor every fragment carved out of that page afterwards.  The pool is shared,\nso the damage is not confined to the caller that caused it.\n\nThe per-cpu system_page_pool used by generic XDP hits this.\nskb_pp_cow_data() allocates its fragments with the raw packet length:\n\n\tsize = min_t(u32, len, PAGE_SIZE);\n\ttruesize = size;\n\tpage = page_pool_dev_alloc(pool, &page_off, &truesize);\n\nleaving frag_offset odd for whatever is carved out of that page next.  Its\nown head allocation is already aligned -- SKB_HEAD_ALIGN(size) plus the\nXDP_PACKET_HEADROOM its callers pass -- so it is a later user of the shared\npool that pays: page_pool_dev_alloc_va() returns a misaligned buffer,\nnapi_build_skb() installs it as skb->head, and skb_shinfo(skb) ==\nskb->head + skb->end is misaligned with it.\n\nskb_shinfo()->dataref is a 4-byte atomic_t at offset 0x20, so the\natomic_inc() in __skb_clone() straddles a cache line.  On x86 with split\nlock detection -- fatal for kernel split locks by default -- this panics\nthe machine:\n\n  Oops: Split lock detected\n  RIP: 0010:skb_clone+0x154/0x1e0\n  Call Trace:\n   <IRQ>\n   raw_local_deliver+0x1ed/0x2c0\n   ip_protocol_deliver_rcu+0x54/0x1c0\n   ip_local_deliver_finish+0x85/0x100\n   ip_local_deliver+0x67/0x100\n   __netif_receive_skb_one_core+0x85/0xa0\n   process_backlog+0x87/0x130\n\nReproduced by attaching any generic-mode XDP program to loopback and\nopening a RAW IPPROTO_UDP socket, which makes raw_local_deliver() clone\nevery locally delivered UDP packet; ordinary DNS traffic then triggers it,\nroughly once per 2500 clones.  Observed on 6.12.101 and 7.1.8.\n\nTracing page_pool_alloc_frag_netmem() over one such run shows the\namplification -- two odd-sized requests, nine misaligned offsets:\n\n  requested size & 7:   0: 17035    5: 1    7: 1\n  frag_offset & 7:      0: 17028    3: 1    4: 1    5: 1    6: 1    7: 5\n\nand skb_pp_cow_data() returning heads that were aligned on entry:\n\n  head 0xffff8f4c86aeac00 -> 0xffff8f4c53a9a9c4 (&7=4)\n  head 0xffff8f4d6a8a42c0 -> 0xffff8f4c4f7b7a45 (&7=5)\n\nRound the fragment size up to at least the alignment struct skb_shared_info\nrequires, so fragments are always suitably aligned for the objects callers\nbuild on them.  Architectures needing a larger DMA alignment keep it.\n\nThis also makes the remainder computed in page_pool_alloc_netmem(),\n\n\t*size = max_size - *offset;\n\naligned, since max_size is a power of two -- which fixes the matching\nmisalignment of skb->end.\n\nVerified with a controlled A/B under QEMU/KVM: same tree, same config,\nsame compiler, same rootfs and identical traffic, differing only by this\npatch.  A SEC(\"xdp.frags\") XDP_PASS program on lo plus UDP datagrams\nlarger than max_head_size drives skb_pp_cow_data()'s fragment loop, which\npasses raw packet lengths to the pool.  Measured at the return of\nskb_pp_cow_data():\n\n                          unpatched   patched\n  skb_pp_cow_data calls       40800     40800\n  misaligned skb->head         1120         0\n  dataref at line offset >60     80         0\n\nThe last row counts the accesses that actually fault:\nskb_shinfo()->dataref sits at head+end+0x20 and is a 4-byte atomic, so\n`lock incl` splits a 64-byte cache line only when that address lands at\noffset 61..63.  All 80 occurrences were at offset 61; the panic reported\nabove was at offset 62.  Eliminating the misalignment removes every one\nof them.\n\nSame class of bug as commit 3bed3cc4156e (\"net: Do not allocate page\nfragments t\n---truncated---","publishedAt":"2026-10-28T10:34:41.448Z","updatedAt":"2026-10-30T12:42:01.046Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"8ab058f49e801803c4a755b09fe4a920d194da7f","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"31e1a71995f23446c9d9e6ba170a6b16b110d243","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"ccc28e498ef1c6eaaa16e61c6edb52c32a4f14bb","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"22b67b0f59f5a7f4fa1e6043a1987e167c5d06d2","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"813a72beaa5d3f4bb135e0def9b3f07a3511ca0e","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"dca1b51693c81eaf77e50980be373e01ae857394","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"dc0df5a0c62ccea1d0e08d39a4dc9064de81d411","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/page_pool.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.161","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.115","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.59","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.13","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/page_pool.c"]}],"references":["https://git.kernel.org/stable/c/8ab058f49e801803c4a755b09fe4a920d194da7f","https://git.kernel.org/stable/c/31e1a71995f23446c9d9e6ba170a6b16b110d243","https://git.kernel.org/stable/c/ccc28e498ef1c6eaaa16e61c6edb52c32a4f14bb","https://git.kernel.org/stable/c/22b67b0f59f5a7f4fa1e6043a1987e167c5d06d2","https://git.kernel.org/stable/c/813a72beaa5d3f4bb135e0def9b3f07a3511ca0e","https://git.kernel.org/stable/c/dca1b51693c81eaf77e50980be373e01ae857394","https://git.kernel.org/stable/c/dc0df5a0c62ccea1d0e08d39a4dc9064de81d411"],"weaknesses":[],"ingestedAt":"2026-10-30T13:02:04.640Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99127.json","commit":"cb14bf1b43b0c9f05f7f40eae2246263fd430780","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99127","state":"PUBLISHED","datePublished":"2026-10-28T10:34:41.448Z","dateUpdated":"2026-10-30T12:42:01.046Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.394Z"},"containers":{"cna":{"title":"page_pool: keep frag_offset aligned for odd-sized requests","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npage_pool: keep frag_offset aligned for odd-sized requests\n\npage_pool_alloc_frag_netmem() rounds the requested fragment size with\n\n\tsize = ALIGN(size, dma_get_cache_alignment());\n\ndma_get_cache_alignment() returns 1 unless the architecture defines\nARCH_DMA_MINALIGN, which DMA-coherent architectures such as x86 do not.\nThere the ALIGN() is a no-op and pool->frag_offset advances by the raw,\nunrounded size.\n\nA single caller asking for an odd size then leaves frag_offset misaligned\nfor every fragment carved out of that page afterwards.  The pool is shared,\nso the damage is not confined to the caller that caused it.\n\nThe per-cpu system_page_pool used by generic XDP hits this.\nskb_pp_cow_data() allocates its fragments with the raw packet length:\n\n\tsize = min_t(u32, len, PAGE_SIZE);\n\ttruesize = size;\n\tpage = page_pool_dev_alloc(pool, &page_off, &truesize);\n\nleaving frag_offset odd for whatever is carved out of that page next.  Its\nown head allocation is already aligned -- SKB_HEAD_ALIGN(size) plus the\nXDP_PACKET_HEADROOM its callers pass -- so it is a later user of the shared\npool that pays: page_pool_dev_alloc_va() returns a misaligned buffer,\nnapi_build_skb() installs it as skb->head, and skb_shinfo(skb) ==\nskb->head + skb->end is misaligned with it.\n\nskb_shinfo()->dataref is a 4-byte atomic_t at offset 0x20, so the\natomic_inc() in __skb_clone() straddles a cache line.  On x86 with split\nlock detection -- fatal for kernel split locks by default -- this panics\nthe machine:\n\n  Oops: Split lock detected\n  RIP: 0010:skb_clone+0x154/0x1e0\n  Call Trace:\n   <IRQ>\n   raw_local_deliver+0x1ed/0x2c0\n   ip_protocol_deliver_rcu+0x54/0x1c0\n   ip_local_deliver_finish+0x85/0x100\n   ip_local_deliver+0x67/0x100\n   __netif_receive_skb_one_core+0x85/0xa0\n   process_backlog+0x87/0x130\n\nReproduced by attaching any generic-mode XDP program to loopback and\nopening a RAW IPPROTO_UDP socket, which makes raw_local_deliver() clone\nevery locally delivered UDP packet; ordinary DNS traffic then triggers it,\nroughly once per 2500 clones.  Observed on 6.12.101 and 7.1.8.\n\nTracing page_pool_alloc_frag_netmem() over one such run shows the\namplification -- two odd-sized requests, nine misaligned offsets:\n\n  requested size & 7:   0: 17035    5: 1    7: 1\n  frag_offset & 7:      0: 17028    3: 1    4: 1    5: 1    6: 1    7: 5\n\nand skb_pp_cow_data() returning heads that were aligned on entry:\n\n  head 0xffff8f4c86aeac00 -> 0xffff8f4c53a9a9c4 (&7=4)\n  head 0xffff8f4d6a8a42c0 -> 0xffff8f4c4f7b7a45 (&7=5)\n\nRound the fragment size up to at least the alignment struct skb_shared_info\nrequires, so fragments are always suitably aligned for the objects callers\nbuild on them.  Architectures needing a larger DMA alignment keep it.\n\nThis also makes the remainder computed in page_pool_alloc_netmem(),\n\n\t*size = max_size - *offset;\n\naligned, since max_size is a power of two -- which fixes the matching\nmisalignment of skb->end.\n\nVerified with a controlled A/B under QEMU/KVM: same tree, same config,\nsame compiler, same rootfs and identical traffic, differing only by this\npatch.  A SEC(\"xdp.frags\") XDP_PASS program on lo plus UDP datagrams\nlarger than max_head_size drives skb_pp_cow_data()'s fragment loop, which\npasses raw packet lengths to the pool.  Measured at the return of\nskb_pp_cow_data():\n\n                          unpatched   patched\n  skb_pp_cow_data calls       40800     40800\n  misaligned skb->head         1120         0\n  dataref at line offset >60     80         0\n\nThe last row counts the accesses that actually fault:\nskb_shinfo()->dataref sits at head+end+0x20 and is a 4-byte atomic, so\n`lock incl` splits a 64-byte cache line only when that address lands at\noffset 61..63.  All 80 occurrences were at offset 61; the panic reported\nabove was at offset 62.  Eliminating the misalignment removes every one\nof them.\n\nSame class of bug as commit 3bed3cc4156e (\"net: Do not allocate page\nfragments t\n---truncated---"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"8ab058f49e801803c4a755b09fe4a920d194da7f","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"31e1a71995f23446c9d9e6ba170a6b16b110d243","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"ccc28e498ef1c6eaaa16e61c6edb52c32a4f14bb","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"22b67b0f59f5a7f4fa1e6043a1987e167c5d06d2","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"813a72beaa5d3f4bb135e0def9b3f07a3511ca0e","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"dca1b51693c81eaf77e50980be373e01ae857394","versionType":"git"},{"version":"53e0961da1c7bbdabd1abebb20de403ec237ec09","status":"affected","lessThan":"dc0df5a0c62ccea1d0e08d39a4dc9064de81d411","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/page_pool.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.161","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.115","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.59","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.13","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/page_pool.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8ab058f49e801803c4a755b09fe4a920d194da7f"},{"url":"https://git.kernel.org/stable/c/31e1a71995f23446c9d9e6ba170a6b16b110d243"},{"url":"https://git.kernel.org/stable/c/ccc28e498ef1c6eaaa16e61c6edb52c32a4f14bb"},{"url":"https://git.kernel.org/stable/c/22b67b0f59f5a7f4fa1e6043a1987e167c5d06d2"},{"url":"https://git.kernel.org/stable/c/813a72beaa5d3f4bb135e0def9b3f07a3511ca0e"},{"url":"https://git.kernel.org/stable/c/dca1b51693c81eaf77e50980be373e01ae857394"},{"url":"https://git.kernel.org/stable/c/dc0df5a0c62ccea1d0e08d39a4dc9064de81d411"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:42:01.046Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.224"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.161"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.115"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.18.59"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.2.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}