PT-2026-162947

CVE-2026-99980

·

Publicado

2026-11-30

·

Atualizado

2026-11-30

Descrição por

Pontuação
N/A
Não disponível

Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.

In the Linux kernel, the following vulnerability has been resolved:
netdev: Hide the netdev priv() origin from GCC in netdev from priv()
GCC 15.1 and later can compute an object size of 0 for a pointer that container of() derives from a pointer into a counted by flexible array member[1]; Clang gets it right. netdev from priv() does this with struct net device's "priv" array, so when GCC can see that its argument came from netdev priv(), FORTIFY SOURCE sees a zero-sized net device. Since commit 9027497a25e3c ("team: use netdev from priv()"), adding a port of another type to a team device can then fail the memcpy() to "dev->broadcast" in team setup by port(), which GCC sees through after inlining team port add() into team add slave():
memcpy: detected buffer overflow: 4 byte write of buffer size 0 ... kernel BUG at lib/string helpers.c:1044! ... Call Trace: team add slave.cold+0x88/0x201 do set master+0x11c/0x180 do setlink.isra.0+0x3a4/0x1410
Whether GCC inlines that far depends on the architecture and the configuration. It does on ppc64le, where this was reported, and on x86 64 with defconfig plus hardening.config or with Debian's configuration, but not with allmodconfig.
Hide where "priv" came from with OPTIMIZER HIDE VAR(), so GCC sees a net device of unknown size whose members have their declared sizes. (An "unknown" size is considered uncheckable by FORTIFY.) FORTIFY still bounds writes to members; only the whole-object size becomes unknown, as it already is for any net device pointer GCC can't trace to its allocation. In an extracted PoC, the builtin dynamic object size() of "dev->broadcast" for the two types FORTIFY sees, before and after this patch:
              GCC 16.2.0   Clang 22 and 24
             before  after
plain pointer, whole object unknown unknown 44 container of(), whole object 0 unknown 44 container of(), member 0 32 32
In addition to getting the bogus "0" fixed in GCC, I'll be following up to solve the whole-object visiblity disparity as well.
Build tested with GCC 16.2.0: ARCH=x86 64 defconfig with hardening.config, CONFIG NET TEAM=y, and CONFIG NET IPGRE=y; ARCH=arm64 defconfig with hardening.config, CONFIG NET TEAM=y, CONFIG PPP=y, and CONFIG NET AIROHA=m; and drivers/net/team/, drivers/net/ppp/, and drivers/net/ethernet/airoha/ in ARCH=x86 64 allmodconfig. Under QEMU, the x86 64 kernel hits the BUG above when adding the GRE fallback device "gre0" as a port of a new team device without this patch, and adds it with the patch.
Fornecedores
Produtos afetados
Identificadores relacionados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾