Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2024-26640
HistoryMar 18, 2024 - 11:15 a.m.

CVE-2024-26640

2024-03-1811:15:11
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
54
linux kernel
vulnerability
cve-2024-26640
tcp
rx zerocopy
panic
zhangpeng
loopback packets
ext4 file

6.1 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

10.4%

In the Linux kernel, the following vulnerability has been resolved:

tcp: add sanity checks to rx zerocopy

TCP rx zerocopy intent is to map pages initially allocated
from NIC drivers, not pages owned by a fs.

This patch adds to can_map_frag() these additional checks:

  • Page must not be a compound one.
  • page->mapping must be NULL.

This fixes the panic reported by ZhangPeng.

syzbot was able to loopback packets built with sendfile(),
mapping pages owned by an ext4 file to TCP rx zerocopy.

r3 = socket$inet_tcp(0x2, 0x1, 0x0)
mmap(&(0x7f0000ff9000/0x4000)=nil, 0x4000, 0x0, 0x12, r3, 0x0)
r4 = socket$inet_tcp(0x2, 0x1, 0x0)
bind$inet(r4, &(0x7f0000000000)={0x2, 0x4e24, @multicast1}, 0x10)
connect$inet(r4, &(0x7f00000006c0)={0x2, 0x4e24, @empty}, 0x10)
r5 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)=‘./file0\x00’,
0x181e42, 0x0)
fallocate(r5, 0x0, 0x0, 0x85b8)
sendfile(r4, r5, 0x0, 0x8ba0)
getsockopt$inet_tcp_TCP_ZEROCOPY_RECEIVE(r4, 0x6, 0x23,
&(0x7f00000001c0)={&(0x7f0000ffb000/0x3000)=nil, 0x3000, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0}, &(0x7f0000000440)=0x40)
r6 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)=‘./file0\x00’,
0x181e42, 0x0)

Affected configurations

Vulners
Node
linuxlinux_kernelRange4.185.10.210
OR
linuxlinux_kernelRange5.11.05.15.149
OR
linuxlinux_kernelRange5.16.06.1.77
OR
linuxlinux_kernelRange6.2.06.6.16
OR
linuxlinux_kernelRange6.7.06.7.4
OR
linuxlinux_kernelRange6.8.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/ipv4/tcp.c"
    ],
    "versions": [
      {
        "version": "93ab6cc69162",
        "lessThan": "f48bf9a83b16",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "93ab6cc69162",
        "lessThan": "718f446e6031",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "93ab6cc69162",
        "lessThan": "b383d4ea272f",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "93ab6cc69162",
        "lessThan": "d15cc0f66884",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "93ab6cc69162",
        "lessThan": "1b8adcc0e2c5",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "93ab6cc69162",
        "lessThan": "577e4432f3ac",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/ipv4/tcp.c"
    ],
    "versions": [
      {
        "version": "4.18",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "4.18",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.210",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.149",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.77",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.16",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.7.4",
        "lessThanOrEqual": "6.7.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.1 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

10.4%