Lucene search

K
cveLinuxCVE-2024-46744
HistorySep 18, 2024 - 8:15 a.m.

CVE-2024-46744

2024-09-1808:15:03
Linux
web.nvd.nist.gov
7
linux kernel
squashfs
symbolic link
vulnerability
kmsan
inode size
symlink size
uninit-value
patch
sanity check

AI Score

6.3

Confidence

Low

EPSS

0

Percentile

13.8%

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

Squashfs: sanity check symbolic link size

Syzkiller reports a “KMSAN: uninit-value in pick_link” bug.

This is caused by an uninitialised page, which is ultimately caused
by a corrupted symbolic link size read from disk.

The reason why the corrupted symlink size causes an uninitialised
page is due to the following sequence of events:

  1. squashfs_read_inode() is called to read the symbolic
    link from disk. This assigns the corrupted value
    3875536935 to inode->i_size.

  2. Later squashfs_symlink_read_folio() is called, which assigns
    this corrupted value to the length variable, which being a
    signed int, overflows producing a negative number.

  3. The following loop that fills in the page contents checks that
    the copied bytes is less than length, which being negative means
    the loop is skipped, producing an uninitialised page.

This patch adds a sanity check which checks that the symbolic
link size is not larger than expected.

V2: fix spelling mistake.

Affected configurations

Vulners
Node
linuxlinux_kernelRange4.19.04.19.322
OR
linuxlinux_kernelRange4.20.05.4.284
OR
linuxlinux_kernelRange5.5.05.10.226
OR
linuxlinux_kernelRange5.11.05.15.167
OR
linuxlinux_kernelRange5.16.06.1.110
OR
linuxlinux_kernelRange6.2.06.6.51
OR
linuxlinux_kernelRange6.7.06.10.10
OR
linuxlinux_kernelRange6.11.0
VendorProductVersionCPE
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": [
      "fs/squashfs/inode.c"
    ],
    "versions": [
      {
        "version": "1da177e4c3f4",
        "lessThan": "f82cb7f24032",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "1b9451ba6f21",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "5c8906de98d0",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "087f25b2d36a",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "fac5e82ab133",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "c3af7e460a52",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "ef4e249971eb",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1da177e4c3f4",
        "lessThan": "810ee43d9cd2",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "fs/squashfs/inode.c"
    ],
    "versions": [
      {
        "version": "4.19.322",
        "lessThanOrEqual": "4.19.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.284",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.226",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.167",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.110",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.51",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10.10",
        "lessThanOrEqual": "6.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.11",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

AI Score

6.3

Confidence

Low

EPSS

0

Percentile

13.8%

Related for CVE-2024-46744