HomeFreeBSD

tty: properly check character position when handling IUTF8 backspaces

Description

tty: properly check character position when handling IUTF8 backspaces

The tty_rubchar() code handling backspaces for UTF-8 characters didn't
properly check whether the beginning of the current line was reached.
This resulted in a kernel panic in ttyinq_unputchar() when prodded with
certain malformed UTF-8 sequences.

PR: 275009
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D42564
Approved by: so
Security: FreeBSD-EN-23:21.tty

(cherry picked from commit c6d7be214811c315d234d64c6cbaa92d4f55d2c1)
(cherry picked from commit ae8387cc818a0d6a2229ee049b671482e1549519)

Details

Provenance
bnovkovAuthored on Nov 13 2023, 6:02 PM
markjCommitted on Dec 4 2023, 2:06 PM
Reviewer
christos
Differential Revision
D42564: tty: properly check character position when handling IUTF8 backspaces
Parents
rG4be96902ba82: vm_phys: fix freelist_contig
Branches
Unknown
Tags
Unknown