{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-53768",
  "modified": "2026-10-07T17:22:01Z",
  "upstream": [
    "CVE-2023-53768"
  ],
  "published": "2025-12-08T01:19:54Z",
  "summary": "regmap-irq: Fix out-of-bounds access when allocating config buffers",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nregmap-irq: Fix out-of-bounds access when allocating config buffers\n\nWhen allocating the 2D array for handling IRQ type registers in\nregmap_add_irq_chip_fwnode(), the intent is to allocate a matrix\nwith num_config_bases rows and num_config_regs columns.\n\nThis is currently handled by allocating a buffer to hold a pointer for\neach row (i.e. num_config_bases). After that, the logic attempts to\nallocate the memory required to hold the register configuration for\neach row. However, instead of doing this allocation for each row\n(i.e. num_config_bases allocations), the logic erroneously does this\nallocation num_config_regs number of times.\n\nThis scenario can lead to out-of-bounds accesses when num_config_regs\nis greater than num_config_bases. Fix this by updating the terminating\ncondition of the loop that allocates the memory for holding the register\nconfiguration to allocate memory only for each row in the matrix.\n\nAmit Pundir reported a crash that was occurring on his db845c device\ndue to memory corruption (see \"Closes\" tag for Amit's report). The KASAN\nreport below helped narrow it down to this issue:\n\n[   14.033877][    T1] ==================================================================\n[   14.042507][    T1] BUG: KASAN: invalid-access in regmap_add_irq_chip_fwnode+0x594/0x1364\n[   14.050796][    T1] Write of size 8 at addr 06ffff8081021850 by task init/1\n\n[   14.242004][    T1] The buggy address belongs to the object at ffffff8081021850\n[   14.242004][    T1]  which belongs to the cache kmalloc-8 of size 8\n[   14.255669][    T1] The buggy address is located 0 bytes inside of\n[   14.255669][    T1]  8-byte region [ffffff8081021850, ffffff8081021858)",
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.21-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v6",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7l",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v8",
            "binary_version": "1:6.1.21-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.21-1+rpt1": {
            "linux_commit": "0afb5e98488aed7017b9bf321b575d0177feb7ed",
            "upstream_version": "6.1.21",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.40"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-53768"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b1a726ad33e585e3d9fa70712df31ae105e4532c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6e7b2337ecd028bd888a1a0be4115b8a88faf838"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/963b54df82b6d6206d7def273390bf3f7af558e1"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z"
  }
}
