linux-stable/drivers/tty/vt
Yangxi Xiang 39cdb68c64 vt: fix memory overlapping when deleting chars in the buffer
A memory overlapping copy occurs when deleting a long line. This memory
overlapping copy can cause data corruption when scr_memcpyw is optimized
to memcpy because memcpy does not ensure its behavior if the destination
buffer overlaps with the source buffer. The line buffer is not always
broken, because the memcpy utilizes the hardware acceleration, whose
result is not deterministic.

Fix this problem by using replacing the scr_memcpyw with scr_memmovew.

Fixes: 81732c3b2f ("tty vt: Fix line garbage in virtual console on command line edition")
Cc: stable <stable@kernel.org>
Signed-off-by: Yangxi Xiang <xyangxi5@gmail.com>
Link: https://lore.kernel.org/r/20220628093322.5688-1-xyangxi5@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-30 17:17:40 +02:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
conmakehash.c
consolemap.c vt/consolemap: do font sum unsigned 2021-01-07 16:17:31 +01:00
cp437.uni
defkeymap.c_shipped vt: keyboard, defkeymap.c_shipped, approach the unicode table 2021-01-07 16:17:31 +01:00
defkeymap.map
keyboard.c tty: Fix the keyboard led light display problem 2021-12-21 09:19:14 +01:00
Makefile
selection.c tty: vt: selection: Correct misspelled function sel_loadlut() 2021-05-20 17:05:33 +02:00
vc_screen.c
vt.c vt: fix memory overlapping when deleting chars in the buffer 2022-06-30 17:17:40 +02:00
vt_ioctl.c vt_ioctl: fix potential spectre v1 in VT_DISALLOCATE 2022-03-18 14:35:01 +01:00