]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vt: fix unicode buffer corruption when deleting characters
authorNicolas Pitre <nico@fluxnic.net>
Thu, 29 Feb 2024 22:15:27 +0000 (17:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 10:50:09 +0000 (12:50 +0200)
commitfc7dfe3d123f00e720be80b920da287810a1f37d
tree57b054fc3754ca92a161341848dfaf3f11dedeb4
parent206ef729592010631fd2fe721a94b4e71c61653e
vt: fix unicode buffer corruption when deleting characters

commit 1581dafaf0d34bc9c428a794a22110d7046d186d upstream.

This is the same issue that was fixed for the VGA text buffer in commit
39cdb68c64d8 ("vt: fix memory overlapping when deleting chars in the
buffer"). The cure is also the same i.e. replace memcpy() with memmove()
due to the overlaping buffers.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Fixes: 81732c3b2fed ("tty vt: Fix line garbage in virtual console on command line edition")
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/sn184on2-3p0q-0qrq-0218-895349s4753o@syhkavp.arg
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c