aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorYangxi Xiang <[email protected]>2022-06-28 09:33:22 +0000
committerGreg Kroah-Hartman <[email protected]>2022-06-30 15:17:40 +0000
commit39cdb68c64d84e71a4a717000b6e5de208ee60cc (patch)
tree87de06e2248e3be3b78105091cd9fd760199e36e /drivers/tty/tty_buffer.c
parentserial: mvebu-uart: correctly report configured baudrate value (diff)
downloadkernel-39cdb68c64d84e71a4a717000b6e5de208ee60cc.tar.gz
kernel-39cdb68c64d84e71a4a717000b6e5de208ee60cc.zip
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: 81732c3b2fed ("tty vt: Fix line garbage in virtual console on command line edition") Cc: stable <[email protected]> Signed-off-by: Yangxi Xiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
0 files changed, 0 insertions, 0 deletions