{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-46818",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-46818"
  ],
  "published": "2024-09-27T12:36:20Z",
  "summary": "drm/amd/display: Check gpio_id before used as array index",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Check gpio_id before used as array index\n\n[WHY & HOW]\nGPIO_ID_UNKNOWN (-1) is not a valid value for array index and therefore\nshould be checked in advance.\n\nThis fixes 5 OVERRUN issues reported by Coverity.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.109",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-46818"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8520fdc8ecc38f240a8e9e7af89cca6739c3e790"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/40c2e8bc117cab8bca8814735f28a8b121654a84"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0184cca30cad74d88f5c875d4e26999e26325700"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/276e3fd93e3beb5894eb1cc8480f9f417d51524d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/08e7755f754e3d2cef7d3a7da538d33526bd6f7c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3d4198ab612ad48f73383ad3bb5663e6f0cdf406"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2a5626eeb3b5eec7a36886f9556113dd93ec8ed6"
    }
  ],
  "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.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable GPIO service paths are reached only through the local AMD display driver \u2014 DRM atomic modeset/stereo ioctls on /dev/dri/card0 and link detect/encoder enable on hotplug. There is no network or remote-peer input anywhere on the path.\nAC:L - In the affected versions `id` is an uninitialized stack variable in `dal_gpio_service_create_generic_mux()`/`create_irq()` that `offset_to_id()` leaves unwritten on its DDC arms, so the index is residual stack data a local caller can groom via repeated ioctls before triggering the modeset. No race or unpredictable external state is required.\nPR:L - An unprivileged local user with a graphical session holds DRM master on the card node and can issue the atomic commits that drive `dc_set_generic_gpio_for_stereo()` and encoder enable/disable. No CAP_SYS_ADMIN or root is needed.\nUI:N - The attacker drives the modeset and GPIO open/close sequence entirely from their own process; no second user must open a file, plug in a display, or take any action.\nS:U - The out-of-bounds access corrupts kernel memory belonging to the same kernel security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - `busyness[-1]` loads `factory.funcs` (a kernel `.rodata` pointer) and `is_pin_busy()` dereferences it at attacker-influenced offset `en`, and a groomed index yields an out-of-bounds pointer load plus read \u2014 memory corruption of this shape is leverageable for kernel memory disclosure and KASLR defeat.\nI:H - `set_pin_busy()`/`set_pin_free()` perform an out-of-bounds write (`busyness[id][en] = true/false`) through that out-of-bounds-loaded pointer, landing in the `const struct hw_factory_funcs` vtable whose entries are later invoked indirectly (`funcs->init_ddc_data`, `funcs->get_ddc_pin`), giving a path to control-flow corruption.\nA:H - Writing through the negative index hits read-only `.rodata` under CONFIG_STRICT_KERNEL_RWX, or a wild pointer with a groomed index, producing an immediate kernel oops/panic; the ASSERT_CRITICAL paths do not prevent the access."
    }
  }
}
