speakup: keyhelp: guard letter_offsets possible out-of-range indexing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c6e3fd22cd538365bfeb82997d5b89562e077d42 · < 5310334762c3f08f51dc2414344dd47492c07d1d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
speakup: keyhelp: guard letter_offsets possible out-of-range indexing
help_init() builds letter_offsets[] by using the first byte of each function name as an index via `(start & 31) - 1`. If function_names are overridden from sysfs (root) with a name starting outside [a–z], the index underflows or exceeds the array, leading to OOB write.
Function names can be overridden with the following commands as root:
modprobe speakup_soft echo "0 _bad" > /sys/accessibility/speakup/i18n/function_names # then press Insert+2 on /dev/tty
This fix checks the first letter in help_init(), and if it is not in the [a–z] range the function returns an error to the caller. Eventually this error is propagated to drivers/accessibility/speakup/main.c:2217, which causes a bleep sound.
From the CVE record · Linux
The Linux kernel’s speakup keyhelp can write outside an array if a function name set through sysfs starts with a character outside a–z. Triggering this requires root access to override the name, followed by an Insert+2 keypress on a tty.
Anyone running the Linux kernel with speakup enabled should check whether their kernel includes this fix; affected versions were not specified.