HID: roccat: add KUnit test for kone profile-index bounds

Drive kone_keep_values_up_to_date() with a crafted switch-profile event;
an out-of-range value reads past profiles[] (KASAN slab-out-of-bounds on
an unpatched tree). A benign control with an in-range value exercises the
same path. The test object is sized to end at profiles[] so the over-read
lands in the KASAN redzone.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
Michael Bommarito 2026-06-17 23:00:36 -04:00 • committed by Jiri Kosina
commit 7a5f1acd06
2 changed files with 66 additions and 0 deletions