{
  "threat_severity" : "Moderate",
  "public_date" : "2026-04-24T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: can: gw: fix OOB heap access in cgw_csum_crc8_rel()",
    "id" : "2461554",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2461554"
  },
  "cvss3" : {
    "cvss3_base_score" : "6.1",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H",
    "status" : "draft"
  },
  "cwe" : "CWE-1285",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\ncan: gw: fix OOB heap access in cgw_csum_crc8_rel()\ncgw_csum_crc8_rel() correctly computes bounds-safe indices via calc_idx():\nint from = calc_idx(crc8->from_idx, cf->len);\nint to   = calc_idx(crc8->to_idx,   cf->len);\nint res  = calc_idx(crc8->result_idx, cf->len);\nif (from < 0 || to < 0 || res < 0)\nreturn;\nHowever, the loop and the result write then use the raw s8 fields directly\ninstead of the computed variables:\nfor (i = crc8->from_idx; ...)        /* BUG: raw negative index */\ncf->data[crc8->result_idx] = ...;    /* BUG: raw negative index */\nWith from_idx = to_idx = result_idx = -64 on a 64-byte CAN FD frame,\ncalc_idx(-64, 64) = 0 so the guard passes, but the loop iterates with\ni = -64, reading cf->data[-64], and the write goes to cf->data[-64].\nThis write might end up to 56 (7.0-rc) or 40 (<= 6.19) bytes before the\nstart of the canfd_frame on the heap.\nThe companion function cgw_csum_xor_rel() uses `from`/`to`/`res`\ncorrectly throughout; fix cgw_csum_crc8_rel() to match.\nConfirmed with KASAN on linux-7.0-rc2:\nBUG: KASAN: slab-out-of-bounds in cgw_csum_crc8_rel+0x515/0x5b0\nRead of size 1 at addr ffff8880076619c8 by task poc_cgw_oob/62\nTo configure the can-gw crc8 checksums CAP_NET_ADMIN is needed.", "A flaw was found in the Linux kernel's Controller Area Network (CAN) gateway module. An attacker with CAP_NET_ADMIN capabilities could exploit an out-of-bounds heap access vulnerability in the cgw_csum_crc8_rel() function. This flaw occurs due to incorrect index handling, where raw negative indices are used instead of properly calculated bounds-safe indices. Successful exploitation could lead to memory corruption, potentially resulting in a denial of service or information disclosure." ],
  "statement" : "The CAN gateway CRC helper could index past heap metadata for certain relative checksum modes under `CAP_NET_ADMIN`. Red Hat treats this as a local network-admin attack surface on systems using CAN gateway rules. Install corrected kernels; unloading `can-gw` removes the feature where policy allows.",
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 10",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:10"
  }, {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Fix deferred",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2026-31570\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-31570\nhttps://lore.kernel.org/linux-cve-announce/2026042402-CVE-2026-31570-5f18@gregkh/T" ],
  "name" : "CVE-2026-31570",
  "mitigation" : {
    "value" : "To mitigate this issue, prevent the can-gw module from being loaded. See https://access.redhat.com/solutions/41278 for instructions.",
    "lang" : "en:us"
  },
  "csaw" : false
}