In the Linux kernel, the following vulnerability has been resolved:
hsr: Fix uninit-value access in fillframeinfo()
Syzbot reports the following uninit-value access problem.
===================================================== BUG: KMSAN: uninit-value in fillframeinfo net/hsr/hsrforward.c:601 [inline] BUG: KMSAN: uninit-value in hsrforwardskb+0x9bd/0x30f0 net/hsr/hsrforward.c:616 fillframeinfo net/hsr/hsrforward.c:601 [inline] hsrforwardskb+0x9bd/0x30f0 net/hsr/hsrforward.c:616 hsrdevxmit+0x192/0x330 net/hsr/hsrdevice.c:223 _netdevstartxmit include/linux/netdevice.h:4889 [inline] netdevstartxmit include/linux/netdevice.h:4903 [inline] xmitone net/core/dev.c:3544 [inline] devhardstartxmit+0x247/0xa10 net/core/dev.c:3560 _devqueuexmit+0x34d0/0x52a0 net/core/dev.c:4340 devqueuexmit include/linux/netdevice.h:3082 [inline] packetxmit+0x9c/0x6b0 net/packet/afpacket.c:276 packetsnd net/packet/afpacket.c:3087 [inline] packetsendmsg+0x8b1d/0x9f30 net/packet/afpacket.c:3119 socksendmsgnosec net/socket.c:730 [inline] socksendmsg net/socket.c:753 [inline] _syssendto+0x781/0xa30 net/socket.c:2176 _dosyssendto net/socket.c:2188 [inline] _sesyssendto net/socket.c:2184 [inline] _ia32syssendto+0x11f/0x1c0 net/socket.c:2184 dosyscall32irqson arch/x86/entry/common.c:112 [inline] _dofastsyscall32+0xa2/0x100 arch/x86/entry/common.c:178 dofastsyscall32+0x37/0x80 arch/x86/entry/common.c:203 doSYSENTER32+0x1f/0x30 arch/x86/entry/common.c:246 entrySYSENTERcompatafterhwframe+0x70/0x82
Uninit was created at: slabpostallochook+0x12f/0xb70 mm/slab.h:767 slaballocnode mm/slub.c:3478 [inline] kmemcacheallocnode+0x577/0xa80 mm/slub.c:3523 kmallocreserve+0x148/0x470 net/core/skbuff.c:559 _allocskb+0x318/0x740 net/core/skbuff.c:644 allocskb include/linux/skbuff.h:1286 [inline] allocskbwithfrags+0xc8/0xbd0 net/core/skbuff.c:6299 sockallocsendpskb+0xa80/0xbf0 net/core/sock.c:2794 packetallocskb net/packet/afpacket.c:2936 [inline] packetsnd net/packet/afpacket.c:3030 [inline] packetsendmsg+0x70e8/0x9f30 net/packet/afpacket.c:3119 socksendmsgnosec net/socket.c:730 [inline] socksendmsg net/socket.c:753 [inline] _syssendto+0x781/0xa30 net/socket.c:2176 _dosyssendto net/socket.c:2188 [inline] _sesyssendto net/socket.c:2184 [inline] _ia32syssendto+0x11f/0x1c0 net/socket.c:2184 dosyscall32irqson arch/x86/entry/common.c:112 [inline] _dofastsyscall32+0xa2/0x100 arch/x86/entry/common.c:178 dofastsyscall32+0x37/0x80 arch/x86/entry/common.c:203 doSYSENTER32+0x1f/0x30 arch/x86/entry/common.c:246 entrySYSENTERcompatafterhwframe+0x70/0x82
It is because VLAN not yet supported in hsr driver. Return error when protocol is ETHP8021Q in fillframeinfo() now to fix it.