{"id":"CVE-2026-99980","aliases":[],"cve":{"records":[{"id":"CVE-2026-99980","source":"Linux","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-09-25T10:25:14.450Z","published":"2026-11-30T13:18:50.711Z","modified":"2026-11-30T13:18:50.711Z"}],"publishers":[{"name":"Linux","role":"CNA","organizationId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","modified":"2026-11-30T13:18:50.711Z"}],"references":[{"url":"https://git.kernel.org/stable/c/964b693376ff329071575dadd9dd531d989d12e5","tags":[],"source":"Linux"},{"url":"https://git.kernel.org/stable/c/56f8d919739b588e2ad8cb9fb9eff704f32afaab","tags":[],"source":"Linux"}],"weaknesses":[],"applicability":[{"source":"Linux","statements":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.4-rc1"}]}]}]}],"prioritization":[]},"title":"netdev: Hide the netdev_priv() origin from GCC in netdev_from_priv()","titleSource":"Linux","descriptionSource":"Linux","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetdev: Hide the netdev_priv() origin from GCC in netdev_from_priv()\n\nGCC 15.1 and later can compute an object size of 0 for a pointer that\ncontainer_of() derives from a pointer into a __counted_by flexible array\nmember[1]; Clang gets it right. netdev_from_priv() does this with struct\nnet_device's \"priv\" array, so when GCC can see that its argument came\nfrom netdev_priv(), FORTIFY_SOURCE sees a zero-sized net_device. Since\ncommit 9027497a25e3c (\"team: use netdev_from_priv()\"), adding a port of\nanother type to a team device can then fail the memcpy() to\n\"dev->broadcast\" in team_setup_by_port(), which GCC sees through after\ninlining team_port_add() into team_add_slave():\n\n  memcpy: detected buffer overflow: 4 byte write of buffer size 0\n  ...\n  kernel BUG at lib/string_helpers.c:1044!\n  ...\n  Call Trace:\n   <TASK>\n   team_add_slave.cold+0x88/0x201\n   do_set_master+0x11c/0x180\n   do_setlink.isra.0+0x3a4/0x1410\n\nWhether GCC inlines that far depends on the architecture and the\nconfiguration. It does on ppc64le, where this was reported, and on\nx86_64 with defconfig plus hardening.config or with Debian's\nconfiguration, but not with allmodconfig.\n\nHide where \"priv\" came from with OPTIMIZER_HIDE_VAR(), so GCC sees a\nnet_device of unknown size whose members have their declared sizes. (An\n\"unknown\" size is considered uncheckable by FORTIFY.)  FORTIFY still\nbounds writes to members; only the whole-object size becomes unknown,\nas it already is for any net_device pointer GCC can't trace to its\nallocation. In an extracted PoC, the __builtin_dynamic_object_size()\nof \"dev->broadcast\" for the two types FORTIFY sees, before and after\nthis patch:\n\n                                   GCC 16.2.0      Clang 22 and 24\n                                 before   after\n  plain pointer, whole object   unknown  unknown        44\n  container_of(), whole object        0  unknown        44\n  container_of(), member              0       32        32\n\nIn addition to getting the bogus \"0\" fixed in GCC, I'll be following up\nto solve the whole-object visiblity disparity as well.\n\nBuild tested with GCC 16.2.0: ARCH=x86_64 defconfig with hardening.config,\nCONFIG_NET_TEAM=y, and CONFIG_NET_IPGRE=y; ARCH=arm64 defconfig with\nhardening.config, CONFIG_NET_TEAM=y, CONFIG_PPP=y, and CONFIG_NET_AIROHA=m;\nand drivers/net/team/, drivers/net/ppp/, and drivers/net/ethernet/airoha/\nin ARCH=x86_64 allmodconfig. Under QEMU, the x86_64 kernel hits the BUG\nabove when adding the GRE fallback device \"gre0\" as a port of a new team\ndevice without this patch, and adds it with the patch.","score":null,"severity":"unknown","published":"2026-11-30T13:18:50.711Z","modified":"2026-11-30T13:18:50.711Z","withdrawn":false,"knownExploited":false,"affected":[],"products":[{"vendor":"Linux","name":"Linux","platforms":[],"versions":[{"version":"9027497a25e3c92b5053b2643e0c18f910865625","status":"affected","lessThan":"964b693376ff329071575dadd9dd531d989d12e5","versionType":"git"},{"version":"9027497a25e3c92b5053b2643e0c18f910865625","status":"affected","lessThan":"56f8d919739b588e2ad8cb9fb9eff704f32afaab","versionType":"git"}],"defaultStatus":"unaffected","cpes":[],"source":"Linux","url":"https://www.cve.org/CVERecord?id=CVE-2026-99980"},{"vendor":"Linux","name":"Linux","platforms":[],"versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"defaultStatus":"affected","cpes":[],"source":"Linux","url":"https://www.cve.org/CVERecord?id=CVE-2026-99980"}],"remediation":[],"references":["https://git.kernel.org/stable/c/964b693376ff329071575dadd9dd531d989d12e5","https://git.kernel.org/stable/c/56f8d919739b588e2ad8cb9fb9eff704f32afaab"],"sources":[{"name":"CVE","id":"CVE-2026-99980","modified":"2026-11-30T13:18:50.711Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-99980"}],"assessments":[],"sourceAffected":[],"observedAt":"2026-11-30T14:01:37.663Z","kev":{"status":"not-listed","checkedAt":"2026-11-30T22:55:31.926Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[],"aiSummary":null}