GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

GHSA-6C2R-6HQV-3XPH

Vulnerability from github – Published: 2026-08-27 06:31 – Updated: 2026-08-27 06:31
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

Input: cs40l50-vibra - validate custom data from user space

cs40l50_add() copies the custom data of an FF_PERIODIC/FF_CUSTOM effect straight from the ff_effect the user passed to EVIOCSFF, without requiring it to hold anything:

work_data.custom_data = memdup_array_user(periodic->custom_data,
                                          periodic->custom_len,
                                          sizeof(s16));
work_data.custom_len = periodic->custom_len;

The driver then reads two words out of that buffer: custom_data[0] as the waveform bank in cs40l50_effect_bank_set(), and custom_data[1] as the index within the bank in cs40l50_effect_index_set(). Neither read is covered by a length check, and custom_len is fully user controlled:

  • custom_len == 0 makes memdup_array_user() call memdup_user() with a length of zero, which returns ZERO_SIZE_PTR rather than an error, so custom_data[0] dereferences it.

  • custom_len == 1 allocates two bytes. A bank of ROM or RAM keeps effect->type out of the OWT case, and custom_data[1] is then read one word past the allocation.

The bank value itself is also mishandled. It is masked with CS40L50_CUSTOM_DATA_MASK (0xffff) but stored in an s16, so a custom_data[0] of 0x8000 or above wraps to a negative value that passes the "bank_type >= CS40L50_WVFRM_BANK_NUM" test. cs40l50_effect_index_set() indexes vib->dsp.banks[] with it before the switch statement's default case gets a chance to reject it:

base_index = vib->dsp.banks[effect->type].base_index;
max_index = vib->dsp.banks[effect->type].max_index;

Require the two words the driver reads to be present, and hold the masked bank in a u32 so the existing upper-bound test covers the whole range. The da7280 haptic driver already range checks custom_len this way.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-80575"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-08-26T15:17:13Z",
    "severity": "HIGH"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nInput: cs40l50-vibra - validate custom data from user space\n\ncs40l50_add() copies the custom data of an FF_PERIODIC/FF_CUSTOM effect\nstraight from the ff_effect the user passed to EVIOCSFF, without\nrequiring it to hold anything:\n\n    work_data.custom_data = memdup_array_user(periodic-\u003ecustom_data,\n                                              periodic-\u003ecustom_len,\n                                              sizeof(s16));\n    work_data.custom_len = periodic-\u003ecustom_len;\n\nThe driver then reads two words out of that buffer: custom_data[0] as the\nwaveform bank in cs40l50_effect_bank_set(), and custom_data[1] as the\nindex within the bank in cs40l50_effect_index_set().  Neither read is\ncovered by a length check, and custom_len is fully user controlled:\n\n  - custom_len == 0 makes memdup_array_user() call memdup_user() with a\n    length of zero, which returns ZERO_SIZE_PTR rather than an error, so\n    custom_data[0] dereferences it.\n\n  - custom_len == 1 allocates two bytes.  A bank of ROM or RAM keeps\n    effect-\u003etype out of the OWT case, and custom_data[1] is then read one\n    word past the allocation.\n\nThe bank value itself is also mishandled.  It is masked with\nCS40L50_CUSTOM_DATA_MASK (0xffff) but stored in an s16, so a\ncustom_data[0] of 0x8000 or above wraps to a negative value that passes\nthe \"bank_type \u003e= CS40L50_WVFRM_BANK_NUM\" test.\ncs40l50_effect_index_set() indexes vib-\u003edsp.banks[] with it before the\nswitch statement\u0027s default case gets a chance to reject it:\n\n    base_index = vib-\u003edsp.banks[effect-\u003etype].base_index;\n    max_index = vib-\u003edsp.banks[effect-\u003etype].max_index;\n\nRequire the two words the driver reads to be present, and hold the masked\nbank in a u32 so the existing upper-bound test covers the whole range.\nThe da7280 haptic driver already range checks custom_len this way.",
  "id": "GHSA-6c2r-6hqv-3xph",
  "modified": "2026-08-27T06:31:32Z",
  "published": "2026-08-27T06:31:32Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-80575"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/3855b6a11f8a7aceb8181cc08c99afef58517006"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/52a818c586ae2c36b7324bfaefb547f5e866a8ae"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7d5c576cb1c86047b1fcb1aa9532e17fc5e46c1d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d38554602a0b04e85fad28ce72c7500cf50d419b"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…