{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-45021",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-45021"
  ],
  "published": "2024-09-11T15:14:19Z",
  "summary": "memcg_write_event_control(): fix a user-triggerable oops",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmemcg_write_event_control(): fix a user-triggerable oops\n\nwe are *not* guaranteed that anything past the terminating NUL\nis mapped (let alone initialized with anything sane).",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.107",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-45021"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/fa5bfdf6cb5846a00e712d630a43e3cf55ccb411"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1b37ec85ad95b612307627758c6018cd9d92cca8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ad149f5585345e383baa65f1539d816cd715fd3b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0fbe2a72e853a1052abe9bc2b7df8ddb102da227"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/43768fa80fd192558737e24ed6548f74554611d7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f1aa7c509aa766080db7ab3aec2e31b1df09e57c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/21b578f1d599edb87462f11113c5b0fc7a04ac61"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/046667c4d3196938e992fba0dfcde570aa85cd0e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.1,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerability is triggered by a write(2) to the cgroup v1 file `cgroup.event_control` on a locally mounted cgroupfs hierarchy. There is no network-reachable path to `memcg_write_event_control()`.\nAC:L - The attacker fully controls the write length and content, so the out-of-bounds read past the end of the `kmalloc(len+1)` buffer is 100% deterministic; sizing the write to exactly 4095 bytes places the buffer at a page boundary, and heap/page grooming lets the attacker steer the unbounded `memparse()` walk into an unmapped page. cgroup v1 with the memory controller is a widely deployed default (Android, legacy/hybrid systemd, embedded), not a rare config.\nPR:L - `cgroup.event_control` was flagged `CFTYPE_WORLD_WRITABLE` (mode 0666), so any unprivileged local user can write it wherever a cgroup v1 memory hierarchy is mounted; additionally `cgroup_fs_type` has `FS_USERNS_MOUNT` and `cgroup1_get_tree()` only requires `ns_capable(user_ns, CAP_SYS_ADMIN)`, obtainable via `unshare -Urmc`.\nUI:N - A single write() syscall from the attacker's own process triggers the bug; no victim action, mount by an administrator, or other user involvement is required.\nS:U - The out-of-bounds read and the resulting oops occur entirely within the kernel's own security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The read runs off the end of the slab object and, via `memparse()`/`simple_strtoull()`, continues unbounded until a non-digit byte (and up to 19 bytes via `kstrndup()` on the vmpressure path), so it is not strictly bounded to a few bytes. The parsed adjacent-heap value is installed as a memcg usage threshold that the attacker can read back by driving cgroup memory usage and observing eventfd notifications, giving a genuine kernel-memory disclosure channel.\nI:N - The defect is purely an out-of-bounds read; no memory is written out of bounds and no attacker-controlled write primitive is created. The only state change is a threshold value inside the attacker's own cgroup, which they could already set directly by supplying an explicit args field.\nA:H - The unbounded read past a page-aligned kmalloc-4k object can reach an unmapped page and produce a kernel oops, exactly as described by the fix (\"user-triggerable oops\"); on KASAN or DEBUG_PAGEALLOC kernels the fault is deterministic and repeatable."
    }
  }
}
