HIGH Introduced in 6.11
input cs40l50-vibra OOB
CVE-2026-80575
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.1HIGH
01Description
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.
02KernelScan AI Analysis
Risk summary
A local user can exploit missing validation in the CS40L50 haptic driver to trigger an invalid pointer dereference, out-of-bounds reads, or negative array indexing via a crafted EVIOCSFF ioctl. This can lead to kernel memory disclosure or a system crash. The vulnerability is reachable on systems where the affected input device is present and its device node is accessible.
Vulnerability analysis
The CS40L50 haptic driver copies custom effect data directly from user space without verifying that the buffer contains the two required words, leading to an invalid pointer dereference when the buffer is empty and an out-of-bounds read when it is too short. Additionally, the bank value derived from user input is stored in a signed type, allowing a crafted value to wrap negative and bypass an upper-bound check, resulting in an out-of-bounds array access. The fix adds a length check to ensure the buffer holds at least two words and changes the bank type to an unsigned integer so the existing bounds test covers the full range. An attacker with local access to the input device can trigger this via the EVIOCSFF ioctl, requiring no special privileges if the device node is world-accessible.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.11 | 6.12.105 | 3855b6a11f8a |
| 6.18 | 6.11 | 6.18.46 | 52a818c586ae |
| 7.1 | 6.11 | 7.1.10 | d38554602a0b |
| mainline | 6.11 | 7.2 | 7d5c576cb1c8 |
| cip/6.12 | 6.11 | 6.12.108-cip31 | 3855b6a11f8a |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.108-cip31 |