]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
speakup: Reject setting the speakup line discipline outside of speakup
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 29 Nov 2020 19:35:23 +0000 (20:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Dec 2020 12:22:05 +0000 (13:22 +0100)
commit9920472eaa7c652c7abcad4911fa83b6ae5a4955
treeeda8ab4c7279ba4f3a2b3b4a99299b616fe92d60
parent730649666353d495cfa8eade6e7f57936d0466af
speakup: Reject setting the speakup line discipline outside of speakup

commit f0992098cadb4c9c6a00703b66cafe604e178fea upstream.

Speakup exposing a line discipline allows userland to try to use it,
while it is deemed to be useless, and thus uselessly exposes potential
bugs. One of them is simply that in such a case if the line sends data,
spk_ttyio_receive_buf2 is called and crashes since spk_ttyio_synth
is NULL.

This change restricts the use of the speakup line discipline to
speakup drivers, thus avoiding such kind of issues altogether.

Cc: stable@vger.kernel.org
Reported-by: Shisong Qin <qinshisong1205@gmail.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Shisong Qin <qinshisong1205@gmail.com>
Link: https://lore.kernel.org/r/20201129193523.hm3f6n5xrn6fiyyc@function
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/accessibility/speakup/spk_ttyio.c