In the Linux kernel, the following vulnerability has been resolved:
net: iptunnel: make sure to pull inner header in iptunnel_rcv()
Apply the same fix than ones found in :
8d975c15c0cd ("ip6tunnel: make sure to pull inner header in _ip6tnlrcv()") 1ca1ba465e55 ("geneve: make sure to pull inner header in geneve_rx()")
We have to save skb->networkheader in a temporary variable in order to be able to recompute the networkheader pointer after a pskbinetmay_pull() call.
pskbinetmay_pull() makes sure the needed headers are in skb->head.
syzbot reported: 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 IPECNdecapsulate include/net/inetecn.h:302 [inline] BUG: KMSAN: uninit-value in iptunnelrcv+0xed9/0x2ed0 net/ipv4/iptunnel.c:409 _INETECNdecapsulate include/net/inetecn.h:253 [inline] INETECNdecapsulate include/net/inetecn.h:275 [inline] IPECNdecapsulate include/net/inetecn.h:302 [inline] iptunnelrcv+0xed9/0x2ed0 net/ipv4/iptunnel.c:409 _ipgrercv+0x9bc/0xbc0 net/ipv4/ipgre.c:389 ipgrercv net/ipv4/ipgre.c:411 [inline] grercv+0x423/0x19f0 net/ipv4/ipgre.c:447 grercv+0x2a4/0x390 net/ipv4/gredemux.c:163 ipprotocoldeliverrcu+0x264/0x1300 net/ipv4/ipinput.c:205 iplocaldeliverfinish+0x2b8/0x440 net/ipv4/ipinput.c:233 NFHOOK include/linux/netfilter.h:314 [inline] iplocaldeliver+0x21f/0x490 net/ipv4/ipinput.c:254 dstinput include/net/dst.h:461 [inline] iprcvfinish net/ipv4/ipinput.c:449 [inline] NFHOOK include/linux/netfilter.h:314 [inline] iprcv+0x46f/0x760 net/ipv4/ipinput.c:569 _netifreceiveskbonecore net/core/dev.c:5534 [inline] _netifreceiveskb+0x1a6/0x5a0 net/core/dev.c:5648 netifreceiveskbinternal net/core/dev.c:5734 [inline] netifreceiveskb+0x58/0x660 net/core/dev.c:5793 tunrxbatched+0x3ee/0x980 drivers/net/tun.c:1556 tungetuser+0x53b9/0x66e0 drivers/net/tun.c:2009 tunchrwriteiter+0x3af/0x5d0 drivers/net/tun.c:2055 callwriteiter include/linux/fs.h:2087 [inline] newsyncwrite fs/readwrite.c:497 [inline] vfswrite+0xb6b/0x1520 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+0xcf/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64after_hwframe+0x63/0x6b
Uninit was created at: _allocpages+0x9a6/0xe00 mm/pagealloc.c:4590 allocpagesmpol+0x62b/0x9d0 mm/mempolicy.c:2133 allocpages+0x1be/0x1e0 mm/mempolicy.c:2204 skbpagefragrefill+0x2bf/0x7c0 net/core/sock.c:2909 tunbuildskb drivers/net/tun.c:1686 [inline] tungetuser+0xe0a/0x66e0 drivers/net/tun.c:1826 tunchrwriteiter+0x3af/0x5d0 drivers/net/tun.c:2055 callwriteiter include/linux/fs.h:2087 [inline] newsyncwrite fs/readwrite.c:497 [inline] vfswrite+0xb6b/0x1520 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+0xcf/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64after_hwframe+0x63/0x6b
[
{
"id": "CVE-2024-26882-04bc808e",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"172581334142442436877455363967720926890",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca914f1cdee8a85799942c9b0ce5015bbd6844e1",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-072d3772",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "278723799671683831878991889405279237488",
"length": 1790.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca914f1cdee8a85799942c9b0ce5015bbd6844e1",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-16c3dc8e",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "10227190867472030427197481887834263765",
"length": 1783.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5c03387021cfa3336b97e0dcba38029917a8af2a",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-17ac0e3a",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"89170070742040309796391815145713165938",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5c03387021cfa3336b97e0dcba38029917a8af2a",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-3bef3136",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"89170070742040309796391815145713165938",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77fd5294ea09b21f6772ac954a121b87323cec80",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-4c5abd4c",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"172581334142442436877455363967720926890",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4c857723b37c20651300b3de4ff25059848b4b0",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-59f78d79",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "278723799671683831878991889405279237488",
"length": 1790.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c4c857723b37c20651300b3de4ff25059848b4b0",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-766029ad",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"153917116843611623999897536901277301196",
"295171330504859470879273389959353652201",
"224585248312692417064523816624160966574",
"89170070742040309796391815145713165938",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec6bb01e02cbd47781dd90775b631a1dc4bd9d2b",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-810f5919",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "10227190867472030427197481887834263765",
"length": 1783.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60044ab84836359534bd7153b92e9c1584140e4a",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-b39114b0",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "278723799671683831878991889405279237488",
"length": 1790.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0ec2abf98267f14d032102551581c833b0659d3",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-d385e96e",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"172581334142442436877455363967720926890",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f6723d8dbfdc10c784a56748f86a9a3cd410dbd5",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-e6f71cc7",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "10227190867472030427197481887834263765",
"length": 1783.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77fd5294ea09b21f6772ac954a121b87323cec80",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-e8992ec8",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"89170070742040309796391815145713165938",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60044ab84836359534bd7153b92e9c1584140e4a",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-ec06dd7c",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "278723799671683831878991889405279237488",
"length": 1790.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f6723d8dbfdc10c784a56748f86a9a3cd410dbd5",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-f57e83c4",
"target": {
"file": "net/ipv4/ip_tunnel.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"24084340742035414871164139802299981880",
"222334246711861981613512646733427974356",
"224585248312692417064523816624160966574",
"172581334142442436877455363967720926890",
"155133725655120944613707062563305330593",
"220183355351806910635785332048338188063",
"86413032112742416048138608815548630070",
"297788537246995637133900308855780955658"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0ec2abf98267f14d032102551581c833b0659d3",
"signature_version": "v1"
},
{
"id": "CVE-2024-26882-fc7e6931",
"target": {
"file": "net/ipv4/ip_tunnel.c",
"function": "ip_tunnel_rcv"
},
"digest": {
"function_hash": "71838778124212464119844145250385038910",
"length": 1912.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec6bb01e02cbd47781dd90775b631a1dc4bd9d2b",
"signature_version": "v1"
}
]