In the Linux kernel, the following vulnerability has been resolved:
gtp: pull network headers in gtpdevxmit()
syzbot/KMSAN reported use of uninit-value in getdevxmit() [1]
We must make sure the IPv4 or Ipv6 header is pulled in skb->head before accessing fields in them.
Use pskbinetmay_pull() to fix this issue.
[1] BUG: KMSAN: uninit-value in ipv6pdpfind drivers/net/gtp.c:220 [inline] BUG: KMSAN: uninit-value in gtpbuildskbip6 drivers/net/gtp.c:1229 [inline] BUG: KMSAN: uninit-value in gtpdevxmit+0x1424/0x2540 drivers/net/gtp.c:1281 ipv6pdpfind drivers/net/gtp.c:220 [inline] gtpbuildskbip6 drivers/net/gtp.c:1229 [inline] gtpdevxmit+0x1424/0x2540 drivers/net/gtp.c:1281 _netdevstartxmit include/linux/netdevice.h:4913 [inline] netdevstartxmit include/linux/netdevice.h:4922 [inline] xmitone net/core/dev.c:3580 [inline] devhardstartxmit+0x247/0xa20 net/core/dev.c:3596 _devqueuexmit+0x358c/0x5610 net/core/dev.c:4423 devqueuexmit include/linux/netdevice.h:3105 [inline] packetxmit+0x9c/0x6c0 net/packet/afpacket.c:276 packetsnd net/packet/afpacket.c:3145 [inline] packetsendmsg+0x90e3/0xa3a0 net/packet/afpacket.c:3177 socksendmsgnosec net/socket.c:730 [inline] _socksendmsg+0x30f/0x380 net/socket.c:745 _syssendto+0x685/0x830 net/socket.c:2204 _dosyssendto net/socket.c:2216 [inline] _sesyssendto net/socket.c:2212 [inline] _x64syssendto+0x125/0x1d0 net/socket.c:2212 x64syscall+0x3799/0x3c10 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
Uninit was created at: slabpostallochook mm/slub.c:3994 [inline] slaballocnode mm/slub.c:4037 [inline] kmemcacheallocnodenoprof+0x6bf/0xb80 mm/slub.c:4080 kmallocreserve+0x13d/0x4a0 net/core/skbuff.c:583 _allocskb+0x363/0x7b0 net/core/skbuff.c:674 allocskb include/linux/skbuff.h:1320 [inline] allocskbwithfrags+0xc8/0xbf0 net/core/skbuff.c:6526 sockallocsendpskb+0xa81/0xbf0 net/core/sock.c:2815 packetallocskb net/packet/afpacket.c:2994 [inline] packetsnd net/packet/afpacket.c:3088 [inline] packetsendmsg+0x749c/0xa3a0 net/packet/afpacket.c:3177 socksendmsgnosec net/socket.c:730 [inline] _socksendmsg+0x30f/0x380 net/socket.c:745 _syssendto+0x685/0x830 net/socket.c:2204 _dosyssendto net/socket.c:2216 [inline] _sesyssendto net/socket.c:2212 [inline] _x64syssendto+0x125/0x1d0 net/socket.c:2212 x64syscall+0x3799/0x3c10 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
CPU: 0 UID: 0 PID: 7115 Comm: syz.1.515 Not tainted 6.11.0-rc1-syzkaller-00043-g94ede2a3e913 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
[
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f5dda8db382c5751c4e572afc7c99df7da1f83ca",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-0fdb8c9f",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f5dda8db382c5751c4e572afc7c99df7da1f83ca",
"digest": {
"length": 857.0,
"function_hash": "302316024105676791110413290230842168007"
},
"id": "CVE-2024-44999-11579ee3",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@137d565ab89ce3584503b443bc9e00d44f482593",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-199bf23b",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a3be7ff9224f424e485287b54be00d2c6bd9c40",
"digest": {
"length": 1176.0,
"function_hash": "323654630984593943094864250352612974602"
},
"id": "CVE-2024-44999-3ee0c777",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cbb9a969fc190e85195d1b0f08038e7f6199044e",
"digest": {
"length": 857.0,
"function_hash": "302316024105676791110413290230842168007"
},
"id": "CVE-2024-44999-4c9d7409",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@34ba4f29f3d9eb52dee37512059efb2afd7e966f",
"digest": {
"length": 918.0,
"function_hash": "220736218927239074981520470209871158481"
},
"id": "CVE-2024-44999-4d8a7118",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3939d787139e359b77aaf9485d1e145d6713d7b9",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-4ec312e5",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1f6b62392453d8f36685d19b761307a8c5617ac1",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-66a65afb",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@137d565ab89ce3584503b443bc9e00d44f482593",
"digest": {
"length": 918.0,
"function_hash": "220736218927239074981520470209871158481"
},
"id": "CVE-2024-44999-7c88f126",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a3be7ff9224f424e485287b54be00d2c6bd9c40",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-ad5018ec",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d89d0c4a1c6d4d2a755e826351b0a101dbc86f3",
"digest": {
"length": 857.0,
"function_hash": "302316024105676791110413290230842168007"
},
"id": "CVE-2024-44999-bd64a9f5",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cbb9a969fc190e85195d1b0f08038e7f6199044e",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-d7fa1a36",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1f6b62392453d8f36685d19b761307a8c5617ac1",
"digest": {
"length": 918.0,
"function_hash": "220736218927239074981520470209871158481"
},
"id": "CVE-2024-44999-dc36d033",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d89d0c4a1c6d4d2a755e826351b0a101dbc86f3",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-dcac24a3",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@34ba4f29f3d9eb52dee37512059efb2afd7e966f",
"digest": {
"line_hashes": [
"180487231403595470264794934188591335712",
"285836255452488550567859506579383056342",
"162444339396674269957779802262212633452"
],
"threshold": 0.9
},
"id": "CVE-2024-44999-ea519ab4",
"signature_version": "v1",
"target": {
"file": "drivers/net/gtp.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3939d787139e359b77aaf9485d1e145d6713d7b9",
"digest": {
"length": 1176.0,
"function_hash": "323654630984593943094864250352612974602"
},
"id": "CVE-2024-44999-ef611a5c",
"signature_version": "v1",
"target": {
"function": "gtp_dev_xmit",
"file": "drivers/net/gtp.c"
}
}
]