In the Linux kernel, the following vulnerability has been resolved:
net: hsr: avoid potential out-of-bound access in fillframeinfo()
syzbot is able to feed a packet with 14 bytes, pretending it is a vlan one.
Since fillframeinfo() is relying on skb->mac_len already, extend the check to cover this case.
BUG: KMSAN: uninit-value in fillframeinfo net/hsr/hsrforward.c:709 [inline] BUG: KMSAN: uninit-value in hsrforwardskb+0x9ee/0x3b10 net/hsr/hsrforward.c:724 fillframeinfo net/hsr/hsrforward.c:709 [inline] hsrforwardskb+0x9ee/0x3b10 net/hsr/hsrforward.c:724 hsrdevxmit+0x2f0/0x350 net/hsr/hsrdevice.c:235 _netdevstartxmit include/linux/netdevice.h:5002 [inline] netdevstartxmit include/linux/netdevice.h:5011 [inline] xmitone net/core/dev.c:3590 [inline] devhardstartxmit+0x247/0xa20 net/core/dev.c:3606 _devqueuexmit+0x366a/0x57d0 net/core/dev.c:4434 devqueuexmit include/linux/netdevice.h:3168 [inline] packetxmit+0x9c/0x6c0 net/packet/afpacket.c:276 packetsnd net/packet/afpacket.c:3146 [inline] packetsendmsg+0x91ae/0xa6f0 net/packet/afpacket.c:3178 socksendmsgnosec net/socket.c:711 [inline] _socksendmsg+0x30f/0x380 net/socket.c:726 _syssendto+0x594/0x750 net/socket.c:2197 _dosyssendto net/socket.c:2204 [inline] _sesyssendto net/socket.c:2200 [inline] _x64syssendto+0x125/0x1d0 net/socket.c:2200 x64syscall+0x346a/0x3c30 arch/x86/include/generated/asm/syscalls64.h:45 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xcd/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64after_hwframe+0x77/0x7f
Uninit was created at: slabpostallochook mm/slub.c:4091 [inline] slaballocnode mm/slub.c:4134 [inline] kmemcacheallocnodenoprof+0x6bf/0xb80 mm/slub.c:4186 kmallocreserve+0x13d/0x4a0 net/core/skbuff.c:587 _allocskb+0x363/0x7b0 net/core/skbuff.c:678 allocskb include/linux/skbuff.h:1323 [inline] allocskbwithfrags+0xc8/0xd00 net/core/skbuff.c:6612 sockallocsendpskb+0xa81/0xbf0 net/core/sock.c:2881 packetallocskb net/packet/afpacket.c:2995 [inline] packetsnd net/packet/afpacket.c:3089 [inline] packetsendmsg+0x74c6/0xa6f0 net/packet/afpacket.c:3178 socksendmsgnosec net/socket.c:711 [inline] _socksendmsg+0x30f/0x380 net/socket.c:726 _syssendto+0x594/0x750 net/socket.c:2197 _dosyssendto net/socket.c:2204 [inline] _sesyssendto net/socket.c:2200 [inline] _x64syssendto+0x125/0x1d0 net/socket.c:2200 x64syscall+0x346a/0x3c30 arch/x86/include/generated/asm/syscalls64.h:45 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xcd/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x77/0x7f
[
{
"digest": {
"function_hash": "95063576041882064465901682799547190129",
"length": 1218.0
},
"id": "CVE-2024-56648-0c0ab567",
"target": {
"file": "net/hsr/hsr_forward.c",
"function": "fill_frame_info"
},
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ea527fbd7b94d0bee64a0a7e98279bcc654b322",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"286442153814010280076727732503060204919",
"252511820346348790960470721796473142233",
"70118424291039490460095221516011374303",
"201187649177545632687395126054059665740"
]
},
"id": "CVE-2024-56648-0d0a1bcd",
"target": {
"file": "net/hsr/hsr_forward.c"
},
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ea527fbd7b94d0bee64a0a7e98279bcc654b322",
"deprecated": false
},
{
"digest": {
"function_hash": "156944708199673429574672402095944436468",
"length": 1004.0
},
"id": "CVE-2024-56648-1cbb27cc",
"target": {
"file": "net/hsr/hsr_forward.c",
"function": "fill_frame_info"
},
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c215663b3e27a3b08cefcaea623ff54c70c8035",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"286442153814010280076727732503060204919",
"252511820346348790960470721796473142233",
"70118424291039490460095221516011374303",
"227754566902992165593584374685950980103"
]
},
"id": "CVE-2024-56648-4defdf0f",
"target": {
"file": "net/hsr/hsr_forward.c"
},
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9653d19e556c6afd035602927a93d100a0d7644",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"286442153814010280076727732503060204919",
"252511820346348790960470721796473142233",
"70118424291039490460095221516011374303",
"201187649177545632687395126054059665740"
]
},
"id": "CVE-2024-56648-50bc6c87",
"target": {
"file": "net/hsr/hsr_forward.c"
},
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c215663b3e27a3b08cefcaea623ff54c70c8035",
"deprecated": false
},
{
"digest": {
"function_hash": "156944708199673429574672402095944436468",
"length": 1004.0
},
"id": "CVE-2024-56648-77928af4",
"target": {
"file": "net/hsr/hsr_forward.c",
"function": "fill_frame_info"
},
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa632691c722a123e47ccd05a3afdd5f87a36061",
"deprecated": false
},
{
"digest": {
"function_hash": "114353023121846555812964099481231617420",
"length": 1145.0
},
"id": "CVE-2024-56648-b87e7fac",
"target": {
"file": "net/hsr/hsr_forward.c",
"function": "fill_frame_info"
},
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9653d19e556c6afd035602927a93d100a0d7644",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"286442153814010280076727732503060204919",
"252511820346348790960470721796473142233",
"70118424291039490460095221516011374303",
"201187649177545632687395126054059665740"
]
},
"id": "CVE-2024-56648-c9f113ee",
"target": {
"file": "net/hsr/hsr_forward.c"
},
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e778901d0055356c4fb223058364cae731494a",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"286442153814010280076727732503060204919",
"252511820346348790960470721796473142233",
"70118424291039490460095221516011374303",
"201187649177545632687395126054059665740"
]
},
"id": "CVE-2024-56648-d01b876f",
"target": {
"file": "net/hsr/hsr_forward.c"
},
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bb5c8ebc99f0671dbd3c9408ebaf935c3951186",
"deprecated": false
},
{
"digest": {
"function_hash": "156944708199673429574672402095944436468",
"length": 1004.0
},
"id": "CVE-2024-56648-d23b92ac",
"target": {
"file": "net/hsr/hsr_forward.c",
"function": "fill_frame_info"
},
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e778901d0055356c4fb223058364cae731494a",
"deprecated": false
},
{
"digest": {
"function_hash": "156944708199673429574672402095944436468",
"length": 1004.0
},
"id": "CVE-2024-56648-e532add5",
"target": {
"file": "net/hsr/hsr_forward.c",
"function": "fill_frame_info"
},
"signature_type": "Function",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6bb5c8ebc99f0671dbd3c9408ebaf935c3951186",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"286442153814010280076727732503060204919",
"252511820346348790960470721796473142233",
"70118424291039490460095221516011374303",
"201187649177545632687395126054059665740"
]
},
"id": "CVE-2024-56648-fee8c6c0",
"target": {
"file": "net/hsr/hsr_forward.c"
},
"signature_type": "Line",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa632691c722a123e47ccd05a3afdd5f87a36061",
"deprecated": false
}
]