]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:25:02 +0000 (14:25 +0100)
commit8cb0f6fcd8a49dac5b283353bba17f1d6cd33f6c
tree122100cc41a2c042cb79ecdd72df8d78f2e859c5
parent18c3fcf9921bdf9524145708d71f8454bc42f7af
speakup: Reject setting the speakup line discipline outside of speakup

BugLink: https://bugs.launchpad.net/bugs/1910784
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/staging/speakup/spk_ttyio.c