← Back to CVE Explorer

CVE-2026-64274

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: Input: goodix - clamp the device-reported contact count goodix_ts_read_input_report() copies the number of touch points reported by the device into an on-stack buffer u8 point_data[2 + GOODIX_MAX_CONTACT_SIZE * GOODIX_MAX_CONTACTS]; which is sized for at most GOODIX_MAX_CONTACTS (10) contacts. The only runtime check bounds the per-interrupt count against ts->max_touch_num, but that value is taken verbatim from a 4-bit field of the device configuration block and is never clamped: ts->max_touch_num = ts->config[MAX_CONTACTS_LOC] & 0x0f; The nibble can be 0..15, so a malfunctioning, malicious or counterfeit controller (or an attacker tampering with the I2C bus) can advertise up to 15 contacts. goodix_ts_read_input_report() then accepts a touch_num of up to 15 and the second goodix_i2c_read() writes ts->contact_size * (touch_num - 1) bytes past the one-contact header into point_data - up to 30 bytes (45 with the 9-byte report format) beyond the 92-byte buffer: a stack out-of-bounds write. Clamp max_touch_num to GOODIX_MAX_CONTACTS, the number of contacts point_data[] is sized for, when reading it from the configuration.

Severity
HIGH
CVSS score
7.8 (v3.1)
Vulnerability status
Analyzed
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-07-25 10:17:07.797000
Last modified
2026-10-24 13:10:00.147000
View original CVE JSON
{
  "id": "CVE-2026-64274",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-07-25T10:17:07.797",
  "lastModified": "2026-10-24T13:10:00.147",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nInput: goodix - clamp the device-reported contact count\n\ngoodix_ts_read_input_report() copies the number of touch points reported\nby the device into an on-stack buffer\n\n\tu8 point_data[2 + GOODIX_MAX_CONTACT_SIZE * GOODIX_MAX_CONTACTS];\n\nwhich is sized for at most GOODIX_MAX_CONTACTS (10) contacts. The only\nruntime check bounds the per-interrupt count against ts->max_touch_num,\nbut that value is taken verbatim from a 4-bit field of the device\nconfiguration block and is never clamped:\n\n\tts->max_touch_num = ts->config[MAX_CONTACTS_LOC] & 0x0f;\n\nThe nibble can be 0..15, so a malfunctioning, malicious or counterfeit\ncontroller (or an attacker tampering with the I2C bus) can advertise up\nto 15 contacts. goodix_ts_read_input_report() then accepts a touch_num\nof up to 15 and the second goodix_i2c_read() writes\nts->contact_size * (touch_num - 1) bytes past the one-contact header into\npoint_data - up to 30 bytes (45 with the 9-byte report format) beyond the\n92-byte buffer: a stack out-of-bounds write.\n\nClamp max_touch_num to GOODIX_MAX_CONTACTS, the number of contacts\npoint_data[] is sized for, when reading it from the configuration."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nInput: goodix - limitar el recuento de contactos informado por el dispositivo\n\ngoodix_ts_read_input_report() copia el número de puntos táctiles informados por el dispositivo en un búfer en la pila\n\nu8 point_data[2 + GOODIX_MAX_CONTACT_SIZE * GOODIX_MAX_CONTACTS];\n\nel cual tiene un tamaño para un máximo de GOODIX_MAX_CONTACTS (10) contactos. La única comprobación en tiempo de ejecución limita el recuento por interrupción contra ts  ->  max_touch_num, pero ese valor se toma textualmente de un campo de 4 bits del bloque de configuración del dispositivo y nunca se limita:\n\nts  ->  max_touch_num = ts  ->  config[MAX_CONTACTS_LOC] & 0x0f;\n\nEl nibble puede ser 0..15, por lo que un controlador defectuoso, malicioso o falsificado (o un atacante manipulando el bus I2C) puede anunciar hasta 15 contactos. goodix_ts_read_input_report() entonces acepta un touch_num de hasta 15 y la segunda goodix_i2c_read() escribe ts  ->  contact_size * (touch_num - 1) bytes más allá de la cabecera de un contacto en point_data - hasta 30 bytes (45 con el formato de informe de 9 bytes) más allá del búfer de 92 bytes: una escritura fuera de límites de la pila.\n\nLimitar max_touch_num a GOODIX_MAX_CONTACTS, el número de contactos para el que point_data[] tiene el tamaño, al leerlo de la configuración."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "drivers/input/touchscreen/goodix.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "e825f352ef5271255cd08cc994b0dc25648a2f38",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "4bfea9c3a0981c1c7fc5d1a1b27197b2de247902",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "98b2caef249183b572c04451365246f919707845",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "719d1a2c83a46be6bf81af905e4f6adb3d32dc28",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "46addbd13dbf4aacb71cfbca964a5e552d0f45ae",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "3b32303460155603d25444274856013d211d5e1f",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "2a67668690129953e898923260a2dd1c7c196495",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a7ac7c95d4682883d141c5d7a7544d2818f0a09f",
              "lessThan": "5ed62a96e06be4e94b8296b7932afee550a70e04",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "drivers/input/touchscreen/goodix.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "4.1",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "4.1",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.10.261",
              "lessThanOrEqual": "5.10.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.15.212",
              "lessThanOrEqual": "5.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.178",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.145",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.96",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.39",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.1.4",
              "lessThanOrEqual": "7.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.2",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
          "baseScore": 7.8,
          "baseSeverity": "HIGH",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 5.9
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-787"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "4.1",
              "versionEndExcluding": "5.10.261",
              "matchCriteriaId": "2C338AC7-51C3-43D3-8E70-66343021315C"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.11",
              "versionEndExcluding": "5.15.212",
              "matchCriteriaId": "8E99FB01-CD93-41AF-A653-3F450652B9A6"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.16",
              "versionEndExcluding": "6.1.178",
              "matchCriteriaId": "092233C7-F4E0-40C8-BD4D-A28FE50DFE20"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.2",
              "versionEndExcluding": "6.6.145",
              "matchCriteriaId": "7046B092-F810-4440-ACE6-60218518EECE"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.7",
              "versionEndExcluding": "6.12.96",
              "matchCriteriaId": "38A8100E-2B1A-462F-AEE9-8901B870FEF2"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.13",
              "versionEndExcluding": "6.18.39",
              "matchCriteriaId": "914AE4BC-3D59-4C5A-9DB5-9CE327B429F7"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.19",
              "versionEndExcluding": "7.1.4",
              "matchCriteriaId": "6228DDD6-4557-4AA3-9F43-AB995D471E42"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/2a67668690129953e898923260a2dd1c7c196495",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/3b32303460155603d25444274856013d211d5e1f",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/46addbd13dbf4aacb71cfbca964a5e552d0f45ae",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/4bfea9c3a0981c1c7fc5d1a1b27197b2de247902",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/5ed62a96e06be4e94b8296b7932afee550a70e04",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/719d1a2c83a46be6bf81af905e4f6adb3d32dc28",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/98b2caef249183b572c04451365246f919707845",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/e825f352ef5271255cd08cc994b0dc25648a2f38",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    }
  ]
}