In the Linux kernel, the following vulnerability has been resolved:
net: zero-initialize tc skb extension on allocation
Function skbextadd() doesn't initialize created skb extension with any value and leaves it up to the user. However, since extension of type TCSKBEXT originally contained only single value tcskbext->chain its users used to just assign the chain value without setting whole extension memory to zero first. This assumption changed when TCSKBEXT extension was extended with additional fields but not all users were updated to initialize the new fields which leads to use of uninitialized memory afterwards. UBSAN log:
[ 778.299821] UBSAN: invalid-load in net/openvswitch/flow.c:899:28 [ 778.301495] load of value 107 is not a valid value for type 'Bool' [ 778.303215] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.12.0-rc7+ #2 [ 778.304933] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 778.307901] Call Trace: [ 778.308680] <IRQ> [ 778.309358] dumpstack+0xbb/0x107 [ 778.310307] ubsanepilogue+0x5/0x40 [ 778.311167] _ubsanhandleloadinvalidvalue.cold+0x43/0x48 [ 778.312454] ? memset+0x20/0x40 [ 778.313230] ovsflowkeyextract.cold+0xf/0x14 [openvswitch] [ 778.314532] ovsvportreceive+0x19e/0x2e0 [openvswitch] [ 778.315749] ? ovsvportfindupcallportid+0x330/0x330 [openvswitch] [ 778.317188] ? createprofcpumask+0x20/0x20 [ 778.318220] ? archstackwalk+0x82/0xf0 [ 778.319153] ? secondarystartup64noverify+0xb0/0xbb [ 778.320399] ? stacktracesave+0x91/0xc0 [ 778.321362] ? stacktraceconsumeentry+0x160/0x160 [ 778.322517] ? lockrelease+0x52e/0x760 [ 778.323444] netdevframehook+0x323/0x610 [openvswitch] [ 778.324668] ? ovsnetdevgetvport+0xe0/0xe0 [openvswitch] [ 778.325950] _netifreceiveskbcore+0x771/0x2db0 [ 778.327067] ? lockdowngrade+0x6e0/0x6f0 [ 778.328021] ? lockacquire+0x565/0x720 [ 778.328940] ? genericxdptx+0x4f0/0x4f0 [ 778.329902] ? inetgroreceive+0x2a7/0x10a0 [ 778.330914] ? lockdowngrade+0x6f0/0x6f0 [ 778.331867] ? udp4groreceive+0x4c4/0x13e0 [ 778.332876] ? lockrelease+0x52e/0x760 [ 778.333808] ? devgroreceive+0xcc8/0x2380 [ 778.334810] ? lockdowngrade+0x6f0/0x6f0 [ 778.335769] _netifreceiveskblistcore+0x295/0x820 [ 778.336955] ? processbacklog+0x780/0x780 [ 778.337941] ? mlx5ereptcnetdeviceeventunregister+0x20/0x20 [mlx5core] [ 778.339613] ? seqcountlockdepreaderaccess.constprop.0+0xa7/0xc0 [ 778.341033] ? kvmclockgetcycles+0x14/0x20 [ 778.342072] netifreceiveskblistinternal+0x5f5/0xcb0 [ 778.343288] ? _kasankmalloc+0x7a/0x90 [ 778.344234] ? mlx5ehandlerxcqempwrq+0x9e0/0x9e0 [mlx5core] [ 778.345676] ? mlx5exmitxdpframempwqe+0x14d0/0x14d0 [mlx5core] [ 778.347140] ? _netifreceiveskblistcore+0x820/0x820 [ 778.348351] ? mlx5epostrxmpwqes+0xa6/0x25d0 [mlx5core] [ 778.349688] ? napigroflush+0x26c/0x3c0 [ 778.350641] napicompletedone+0x188/0x6b0 [ 778.351627] mlx5enapipoll+0x373/0x1b80 [mlx5core] [ 778.352853] _napipoll+0x9f/0x510 [ 778.353704] ? mlx5flownamespacesetmode+0x260/0x260 [mlx5core] [ 778.355158] netrxaction+0x34c/0xa40 [ 778.356060] ? napithreadedpoll+0x3d0/0x3d0 [ 778.357083] ? schedclockcpu+0x18/0x190 [ 778.358041] ? _commoninterrupt+0x8e/0x1a0 [ 778.359045] _dosoftirq+0x1ce/0x984 [ 778.359938] _irqexitrcu+0x137/0x1d0 [ 778.360865] irqexitrcu+0xa/0x20 [ 778.361708] commoninterrupt+0x80/0xa0 [ 778.362640] </IRQ> [ 778.363212] asmcommoninterrupt+0x1e/0x40 [ 778.364204] RIP: 0010:nativesafe_halt+0xe/0x10 [ 778.365273] Code: 4f ff ff ff 4c 89 e7 e8 50 3f 40 fe e9 dc fe ff ff 48 89 df e8 43 3f 40 fe eb 90 cc e9 07 00 00 00 0f 00 2d 74 05 62 00 fb f4 <c3> 90 e9 07 00 00 00 0f 00 2d 64 05 62 00 f4 c3 cc cc 0f 1f 44 00 [ 778.369355] RSP: 0018:ffffffff84407e48 EFLAGS: 00000246 [ 778.370570] RAX ---truncated---