{"id":"CVE-2026-143129","state":"PUBLISHED","title":"net/sched: act_ife: require a full Ethernet header on egress","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: act_ife: require a full Ethernet header on egress\n\nThis is a followup of commit 5b483f7791b0 (\"net/sched: act_ife: Only\noperate on Ethernet frames\") as reported by Sashiko.\n\nThe finding was raised by both Sashiko providers (nipa and gemini)\nwhile reviewing the parent patchset. shaos <shawnq1@163.com>\nindependently reported the same undersized-egress path with a\nreproducer, which was reproduced and verified in our test environment.\n\nThe issue:\nOn egress tcf_ife_is_eth_skb() only checks the device type; it does not\ncheck that the skb carries a full Ethernet header. For an Ethernet or\nloopback device it returns true even when the skb has no Ethernet\nheader. tcf_ife_encode() then calls ife_encode(), which copies ETH_HLEN\nbytes from skb->data. A short skb therefore reads past its linear data\nand the copied bytes, including stale kernel memory, are emitted in the\nouter Ethernet header.\n\nThe parent commit fixed the reported ingress mac_len case but left the\negress path without a length check.\n\nA total-length test is not sufficient: a non-GSO TUN skb can have a\nlarge total length while only a single byte sits in the linear area, so\nife_encode() still reads past the linear header. Require instead that\nthe Ethernet header the encoder copies is present in the linear part of\nthe skb.\n\nThe Fix:\nOn egress require pskb_may_pull(skb, ETH_HLEN) before encoding, which\nensures the Ethernet header is present in the linear data ife_encode()\ncopies from; the ingress mac_len check is unchanged. A short egress skb\nis now dropped instead of being encoded.\n\nConditions to recreate the bug:\nCONFIG_NET_ACT_IFE=y, CONFIG_NET_CLS_MATCHALL=y, CONFIG_NET_SCH_INGRESS=y,\nCONFIG_TUN=y, CONFIG_NET_ACT_MIRRED=y. In two user and network\nnamespaces (a victim and an attacker), open a TUN device in IFF_TUN mode\nand attach clsact to it and to lo. Redirect ingress traffic from the TUN\ndevice to lo egress with mirred, and install an ife encode action on lo\negress:\n\n  tc qdisc add dev <tun> clsact\n  tc qdisc add dev lo clsact\n  tc filter add dev <tun> ingress matchall action mirred egress \\\n      redirect dev lo\n  tc filter add dev lo egress matchall action ife encode use mark 1 \\\n      action ok\n\nSend a TUN packet shorter than ETH_HLEN (a one-byte payload is enough)\nand receive the emitted frame on the other side. Without the fix the\nouter Ethernet header contains bytes copied past the short packet; with\nthe fix the short skb is dropped. The attacker needs CAP_NET_ADMIN in\nits user namespace; no init-net privilege is required.\n\nThe same path is reachable when the total length is large but the\nEthernet header is not linear: write a non-GSO virtio header with\nhdr_len=1 followed by an 8192-byte packet so that only one byte stays\nlinear. Without the fix the copied header reads past the linear data;\nwith the fix the header is pulled into the linear area before the copy.","publishedAt":"2026-12-03T09:19:37.936Z","updatedAt":"2026-12-03T09:19:37.936Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"7d44d80e7b89a8ab083156036163cb7c340ea934","versionType":"git"},{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"a88dae565a7adfb8b3d5cfb31523c8fddbb503cc","versionType":"git"},{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"280ef33ca775a4507adf3fd120956e51b30ed585","versionType":"git"},{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"11dbce09083473249c3843ff31bf8d8fa01bdeef","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/act_ife.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.11","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/act_ife.c"]}],"references":["https://git.kernel.org/stable/c/7d44d80e7b89a8ab083156036163cb7c340ea934","https://git.kernel.org/stable/c/a88dae565a7adfb8b3d5cfb31523c8fddbb503cc","https://git.kernel.org/stable/c/280ef33ca775a4507adf3fd120956e51b30ed585","https://git.kernel.org/stable/c/11dbce09083473249c3843ff31bf8d8fa01bdeef"],"weaknesses":[],"ingestedAt":"2026-12-03T09:40:06.136Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143129.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143129","state":"PUBLISHED","datePublished":"2026-12-03T09:19:37.936Z","dateUpdated":"2026-12-03T09:19:37.936Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.352Z"},"containers":{"cna":{"title":"net/sched: act_ife: require a full Ethernet header on egress","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sched: act_ife: require a full Ethernet header on egress\n\nThis is a followup of commit 5b483f7791b0 (\"net/sched: act_ife: Only\noperate on Ethernet frames\") as reported by Sashiko.\n\nThe finding was raised by both Sashiko providers (nipa and gemini)\nwhile reviewing the parent patchset. shaos <shawnq1@163.com>\nindependently reported the same undersized-egress path with a\nreproducer, which was reproduced and verified in our test environment.\n\nThe issue:\nOn egress tcf_ife_is_eth_skb() only checks the device type; it does not\ncheck that the skb carries a full Ethernet header. For an Ethernet or\nloopback device it returns true even when the skb has no Ethernet\nheader. tcf_ife_encode() then calls ife_encode(), which copies ETH_HLEN\nbytes from skb->data. A short skb therefore reads past its linear data\nand the copied bytes, including stale kernel memory, are emitted in the\nouter Ethernet header.\n\nThe parent commit fixed the reported ingress mac_len case but left the\negress path without a length check.\n\nA total-length test is not sufficient: a non-GSO TUN skb can have a\nlarge total length while only a single byte sits in the linear area, so\nife_encode() still reads past the linear header. Require instead that\nthe Ethernet header the encoder copies is present in the linear part of\nthe skb.\n\nThe Fix:\nOn egress require pskb_may_pull(skb, ETH_HLEN) before encoding, which\nensures the Ethernet header is present in the linear data ife_encode()\ncopies from; the ingress mac_len check is unchanged. A short egress skb\nis now dropped instead of being encoded.\n\nConditions to recreate the bug:\nCONFIG_NET_ACT_IFE=y, CONFIG_NET_CLS_MATCHALL=y, CONFIG_NET_SCH_INGRESS=y,\nCONFIG_TUN=y, CONFIG_NET_ACT_MIRRED=y. In two user and network\nnamespaces (a victim and an attacker), open a TUN device in IFF_TUN mode\nand attach clsact to it and to lo. Redirect ingress traffic from the TUN\ndevice to lo egress with mirred, and install an ife encode action on lo\negress:\n\n  tc qdisc add dev <tun> clsact\n  tc qdisc add dev lo clsact\n  tc filter add dev <tun> ingress matchall action mirred egress \\\n      redirect dev lo\n  tc filter add dev lo egress matchall action ife encode use mark 1 \\\n      action ok\n\nSend a TUN packet shorter than ETH_HLEN (a one-byte payload is enough)\nand receive the emitted frame on the other side. Without the fix the\nouter Ethernet header contains bytes copied past the short packet; with\nthe fix the short skb is dropped. The attacker needs CAP_NET_ADMIN in\nits user namespace; no init-net privilege is required.\n\nThe same path is reachable when the total length is large but the\nEthernet header is not linear: write a non-GSO virtio header with\nhdr_len=1 followed by an 8192-byte packet so that only one byte stays\nlinear. Without the fix the copied header reads past the linear data;\nwith the fix the header is pulled into the linear area before the copy."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"7d44d80e7b89a8ab083156036163cb7c340ea934","versionType":"git"},{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"a88dae565a7adfb8b3d5cfb31523c8fddbb503cc","versionType":"git"},{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"280ef33ca775a4507adf3fd120956e51b30ed585","versionType":"git"},{"version":"295a6e06d21e1f469c9f38b00125a13b60ad4e7c","status":"affected","lessThan":"11dbce09083473249c3843ff31bf8d8fa01bdeef","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/act_ife.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.11","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/act_ife.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/7d44d80e7b89a8ab083156036163cb7c340ea934"},{"url":"https://git.kernel.org/stable/c/a88dae565a7adfb8b3d5cfb31523c8fddbb503cc"},{"url":"https://git.kernel.org/stable/c/280ef33ca775a4507adf3fd120956e51b30ed585"},{"url":"https://git.kernel.org/stable/c/11dbce09083473249c3843ff31bf8d8fa01bdeef"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:19:37.936Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}