Date: Sat, 28 Jun 2014 12:45:03 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 191459] New: x11-drivers/xf86-input/keyboard - prevent segfaults for vt(4) users Message-ID: <bug-191459-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191459 Bug ID: 191459 Summary: x11-drivers/xf86-input/keyboard - prevent segfaults for vt(4) users Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: clbuisson@orange.fr In src/bsd_KbdMap.c, the function KbdGetMapping is called to setup an appropriate keyboard map. At line 1260 the function calls ioctl(pInfo->fd, GIO_KEYMAP, &keymap) to get the current OS keyboard mapping, then loops accessing the table eascii_to_x|] to map keyboard delivered chars to X KeySyms. 1. this table is built from the cp437 definition, which is only a special case, not taking into account the many character codes being in real use. 2. the code assumes that the character values delivered by the FreeBSD keyboard driver are only 1 byte wide, which may not be the case using syscons with option TEKEN_UTF8 or using newcons/vt(4). A consequence is that out of bounds accesses are done to the eascii_to_x[] table returning at best meaningless results, or at worst (every time on my amd64 systems) leadind to segmentation faults. As this mapping operation seems to be rather useless, I use a workaround which is to #ifdef this part of the code, using the attached patch. I hope that someone more knowledgeable than me can validate/refine this hack. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191459-13>