Skip to content
Heist/ feed
Unrated

mm, slub: avoid zeroing kmalloc redzone

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: mm, slub: avoid zeroing kmalloc redzone Since commit 946fa0dbf2d8 ("mm/slub: extend redzone check to extra allocated kmalloc space than requested"), setting orig_size treats the wasted space (object_size - orig_size) as a redzone. However with init_on_free=1 we clear the full object->size, including the redzone. Additionally we clear the object metadata, including the stored orig_size, making it zero, which makes check_object() treat the whole object as a redzone. These issues lead to the following BUG report with "slub_debug=FUZ init_on_free=1": [ 0.000000] ============================================================================= [ 0.000000] BUG kmalloc-8 (Not tainted): kmalloc Redzone overwritten [ 0.000000] ----------------------------------------------------------------------------- [ 0.000000] [ 0.000000] 0xffff000010032858-0xffff00001003285f @offset=2136. First byte 0x0 instead of 0xcc [ 0.000000] FIX kmalloc-8: Restoring kmalloc Redzone 0xffff000010032858-0xffff00001003285f=0xcc [ 0.000000] Slab 0xfffffdffc0400c80 objects=36 used=23 fp=0xffff000010032a18 flags=0x3fffe0000000200(workingset|node=0|zone=0|lastcpupid=0x1ffff) [ 0.000000] Object 0xffff000010032858 @offset=2136 fp=0xffff0000100328c8 [ 0.000000] [ 0.000000] Redzone ffff000010032850: cc cc cc cc cc cc cc cc ........ [ 0.000000] Object ffff000010032858: cc cc cc cc cc cc cc cc ........ [ 0.000000] Redzone ffff000010032860: cc cc cc cc cc cc

Announced Source revision 1
Original source ↗

CVE-2024-49885

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2024-49885

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "946fa0dbf2d8923a587f7348adf16563d59f1b3d",
        "lessThan": "7299868253c0e8ba9bf31f6e5198e8eafa1e700b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "946fa0dbf2d8923a587f7348adf16563d59f1b3d",
        "lessThan": "7a2e823a19746d54052c625faecf0d2d6c52ee0a",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "946fa0dbf2d8923a587f7348adf16563d59f1b3d",
        "lessThan": "83f0440b2f92227fcce9898118ca7fe7e0d64b1f",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "946fa0dbf2d8923a587f7348adf16563d59f1b3d",
        "lessThan": "59090e479ac78ae18facd4c58eb332562a23020e",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "mm/slub.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "6.2"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "6.2",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.6.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.10.14",
        "versionType": "semver",
        "lessThanOrEqual": "6.10.*"
      },
      {
        "status": "unaffected",
        "version": "6.11.3",
        "versionType": "semver",
        "lessThanOrEqual": "6.11.*"
      },
      {
        "status": "unaffected",
        "version": "6.12",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "mm/slub.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2024-49885

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

Event
#45907 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement