In the Linux kernel, the following vulnerability has been resolved:
ip6tunnel: make sure to pull inner header in _ip6tnlrcv()
syzbot found _ip6tnl_rcv() could access unitiliazed data [1].
Call pskbinetmay_pull() to fix this, and initialize ipv6h variable after this call as it can change skb->head.
[1] BUG: KMSAN: uninit-value in _INETECNdecapsulate include/net/inetecn.h:253 [inline] BUG: KMSAN: uninit-value in INETECNdecapsulate include/net/inetecn.h:275 [inline] BUG: KMSAN: uninit-value in IP6ECNdecapsulate+0x7df/0x1e50 include/net/inetecn.h:321 _INETECNdecapsulate include/net/inetecn.h:253 [inline] INETECNdecapsulate include/net/inetecn.h:275 [inline] IP6ECNdecapsulate+0x7df/0x1e50 include/net/inetecn.h:321 ip6ip6dscpecndecapsulate+0x178/0x1b0 net/ipv6/ip6tunnel.c:727 _ip6tnlrcv+0xd4e/0x1590 net/ipv6/ip6tunnel.c:845 ip6tnlrcv+0xce/0x100 net/ipv6/ip6tunnel.c:888 grercv+0x143f/0x1870 ip6protocoldeliverrcu+0xda6/0x2a60 net/ipv6/ip6input.c:438 ip6inputfinish net/ipv6/ip6input.c:483 [inline] NFHOOK include/linux/netfilter.h:314 [inline] ip6input+0x15d/0x430 net/ipv6/ip6input.c:492 ip6mcinput+0xa7e/0xc80 net/ipv6/ip6input.c:586 dstinput include/net/dst.h:461 [inline] ip6rcvfinish+0x5db/0x870 net/ipv6/ip6input.c:79 NFHOOK include/linux/netfilter.h:314 [inline] ipv6rcv+0xda/0x390 net/ipv6/ip6input.c:310 _netifreceiveskbonecore net/core/dev.c:5532 [inline] _netifreceiveskb+0x1a6/0x5a0 net/core/dev.c:5646 netifreceiveskbinternal net/core/dev.c:5732 [inline] netifreceiveskb+0x58/0x660 net/core/dev.c:5791 tunrxbatched+0x3ee/0x980 drivers/net/tun.c:1555 tungetuser+0x53af/0x66d0 drivers/net/tun.c:2002 tunchrwriteiter+0x3af/0x5d0 drivers/net/tun.c:2048 callwriteiter include/linux/fs.h:2084 [inline] newsyncwrite fs/readwrite.c:497 [inline] vfswrite+0x786/0x1200 fs/readwrite.c:590 ksyswrite+0x20f/0x4c0 fs/readwrite.c:643 _dosyswrite fs/readwrite.c:655 [inline] _sesyswrite fs/readwrite.c:652 [inline] _x64syswrite+0x93/0xd0 fs/readwrite.c:652 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0x6d/0x140 arch/x86/entry/common.c:83 entrySYSCALL64after_hwframe+0x63/0x6b
Uninit was created at: slabpostallochook+0x129/0xa70 mm/slab.h:768 slaballocnode mm/slub.c:3478 [inline] kmemcacheallocnode+0x5e9/0xb10 mm/slub.c:3523 kmallocreserve+0x13d/0x4a0 net/core/skbuff.c:560 _allocskb+0x318/0x740 net/core/skbuff.c:651 allocskb include/linux/skbuff.h:1286 [inline] allocskbwithfrags+0xc8/0xbd0 net/core/skbuff.c:6334 sockallocsendpskb+0xa80/0xbf0 net/core/sock.c:2787 tunallocskb drivers/net/tun.c:1531 [inline] tungetuser+0x1e8a/0x66d0 drivers/net/tun.c:1846 tunchrwriteiter+0x3af/0x5d0 drivers/net/tun.c:2048 callwriteiter include/linux/fs.h:2084 [inline] newsyncwrite fs/readwrite.c:497 [inline] vfswrite+0x786/0x1200 fs/readwrite.c:590 ksyswrite+0x20f/0x4c0 fs/readwrite.c:643 _dosyswrite fs/readwrite.c:655 [inline] _sesyswrite fs/readwrite.c:652 [inline] _x64syswrite+0x93/0xd0 fs/readwrite.c:652 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0x6d/0x140 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x63/0x6b
CPU: 0 PID: 5034 Comm: syz-executor331 Not tainted 6.7.0-syzkaller-00562-g9f8413c4a66f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
[
{
"digest": {
"line_hashes": [
"105247218693376707957323138405931961461",
"294730112737459101011413956596154918332",
"79561570696375527121744573999283579455",
"126306423321967830090451694552272880929",
"204937604728556040525901157255395255729",
"153604833865233988831041037253062544257",
"162642277312381556551633798976610410241",
"204398742933292042562534121355708926087",
"229603042457312098722088608608684400099",
"43725192770942834115680128720177466530",
"325497635273049555827803527863302613454",
"118110473638158643549763339020060288258",
"142273145209543475421380049487343803956"
],
"threshold": 0.9
},
"target": {
"file": "net/ipv6/ip6_tunnel.c"
},
"signature_type": "Line",
"id": "CVE-2024-26641-1272ebac",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8d975c15c0cd744000ca386247432d57b21f9df0",
"deprecated": false
},
{
"digest": {
"length": 2004.0,
"function_hash": "339435183512486273616946485995964850119"
},
"target": {
"file": "net/ipv6/ip6_tunnel.c",
"function": "__ip6_tnl_rcv"
},
"signature_type": "Function",
"id": "CVE-2024-26641-187aee50",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@350a6640fac4b53564ec20aa3f4a0922cb0ba5e6",
"deprecated": false
},
{
"digest": {
"line_hashes": [
"105247218693376707957323138405931961461",
"294730112737459101011413956596154918332",
"79561570696375527121744573999283579455",
"126306423321967830090451694552272880929",
"204937604728556040525901157255395255729",
"180249049800121358216491352182315646414",
"162642277312381556551633798976610410241",
"204398742933292042562534121355708926087",
"229603042457312098722088608608684400099",
"200349669985848265360943102707453273563",
"67618764411841123880995761824617713993",
"43869087770244947869668025352533294355",
"210431826179965105956919701027970704133",
"118110473638158643549763339020060288258",
"142273145209543475421380049487343803956"
],
"threshold": 0.9
},
"target": {
"file": "net/ipv6/ip6_tunnel.c"
},
"signature_type": "Line",
"id": "CVE-2024-26641-219385ca",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a9bc32879a08f23cdb80a48c738017e39aea1080",
"deprecated": false
},
{
"digest": {
"line_hashes": [
"105247218693376707957323138405931961461",
"294730112737459101011413956596154918332",
"79561570696375527121744573999283579455",
"126306423321967830090451694552272880929",
"204937604728556040525901157255395255729",
"180249049800121358216491352182315646414",
"162642277312381556551633798976610410241",
"204398742933292042562534121355708926087",
"229603042457312098722088608608684400099",
"43725192770942834115680128720177466530",
"325497635273049555827803527863302613454",
"118110473638158643549763339020060288258",
"142273145209543475421380049487343803956"
],
"threshold": 0.9
},
"target": {
"file": "net/ipv6/ip6_tunnel.c"
},
"signature_type": "Line",
"id": "CVE-2024-26641-3a6fa3ea",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d54e4da98bbfa8c257bdca94c49652d81d18a4d8",
"deprecated": false
},
{
"digest": {
"length": 1996.0,
"function_hash": "215420085509514753701350490213266329933"
},
"target": {
"file": "net/ipv6/ip6_tunnel.c",
"function": "__ip6_tnl_rcv"
},
"signature_type": "Function",
"id": "CVE-2024-26641-3b9103f5",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af6b5c50d47ab43e5272ad61935d0ed2e264d3f0",
"deprecated": false
},
{
"digest": {
"line_hashes": [
"105247218693376707957323138405931961461",
"294730112737459101011413956596154918332",
"79561570696375527121744573999283579455",
"126306423321967830090451694552272880929",
"204937604728556040525901157255395255729",
"153604833865233988831041037253062544257",
"162642277312381556551633798976610410241",
"204398742933292042562534121355708926087",
"229603042457312098722088608608684400099",
"43725192770942834115680128720177466530",
"325497635273049555827803527863302613454",
"118110473638158643549763339020060288258",
"142273145209543475421380049487343803956"
],
"threshold": 0.9
},
"target": {
"file": "net/ipv6/ip6_tunnel.c"
},
"signature_type": "Line",
"id": "CVE-2024-26641-7b3dce84",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@350a6640fac4b53564ec20aa3f4a0922cb0ba5e6",
"deprecated": false
},
{
"digest": {
"line_hashes": [
"105247218693376707957323138405931961461",
"294730112737459101011413956596154918332",
"79561570696375527121744573999283579455",
"126306423321967830090451694552272880929",
"204937604728556040525901157255395255729",
"153604833865233988831041037253062544257",
"162642277312381556551633798976610410241",
"204398742933292042562534121355708926087",
"229603042457312098722088608608684400099",
"43725192770942834115680128720177466530",
"325497635273049555827803527863302613454",
"118110473638158643549763339020060288258",
"142273145209543475421380049487343803956"
],
"threshold": 0.9
},
"target": {
"file": "net/ipv6/ip6_tunnel.c"
},
"signature_type": "Line",
"id": "CVE-2024-26641-832b1c77",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c835df3bcc14858ae9b27315dd7de76370b94f3a",
"deprecated": false
},
{
"digest": {
"length": 2004.0,
"function_hash": "339435183512486273616946485995964850119"
},
"target": {
"file": "net/ipv6/ip6_tunnel.c",
"function": "__ip6_tnl_rcv"
},
"signature_type": "Function",
"id": "CVE-2024-26641-8f9a7a8d",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8d975c15c0cd744000ca386247432d57b21f9df0",
"deprecated": false
},
{
"digest": {
"length": 1996.0,
"function_hash": "215420085509514753701350490213266329933"
},
"target": {
"file": "net/ipv6/ip6_tunnel.c",
"function": "__ip6_tnl_rcv"
},
"signature_type": "Function",
"id": "CVE-2024-26641-92ec16b0",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d54e4da98bbfa8c257bdca94c49652d81d18a4d8",
"deprecated": false
},
{
"digest": {
"length": 2004.0,
"function_hash": "339435183512486273616946485995964850119"
},
"target": {
"file": "net/ipv6/ip6_tunnel.c",
"function": "__ip6_tnl_rcv"
},
"signature_type": "Function",
"id": "CVE-2024-26641-9de97da3",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c835df3bcc14858ae9b27315dd7de76370b94f3a",
"deprecated": false
},
{
"digest": {
"line_hashes": [
"105247218693376707957323138405931961461",
"294730112737459101011413956596154918332",
"79561570696375527121744573999283579455",
"126306423321967830090451694552272880929",
"204937604728556040525901157255395255729",
"180249049800121358216491352182315646414",
"162642277312381556551633798976610410241",
"204398742933292042562534121355708926087",
"229603042457312098722088608608684400099",
"43725192770942834115680128720177466530",
"325497635273049555827803527863302613454",
"118110473638158643549763339020060288258",
"142273145209543475421380049487343803956"
],
"threshold": 0.9
},
"target": {
"file": "net/ipv6/ip6_tunnel.c"
},
"signature_type": "Line",
"id": "CVE-2024-26641-d3ef7e91",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af6b5c50d47ab43e5272ad61935d0ed2e264d3f0",
"deprecated": false
},
{
"digest": {
"length": 1975.0,
"function_hash": "297894352067534956572858225422581986601"
},
"target": {
"file": "net/ipv6/ip6_tunnel.c",
"function": "__ip6_tnl_rcv"
},
"signature_type": "Function",
"id": "CVE-2024-26641-ee9601e3",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a9bc32879a08f23cdb80a48c738017e39aea1080",
"deprecated": false
}
]