NetBSD Problem Report #57553

From www@netbsd.org  Sun Jul 30 17:06:24 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id BB8AC1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 30 Jul 2023 17:06:24 +0000 (UTC)
Message-Id: <20230730170622.5BED31A923A@mollari.NetBSD.org>
Date: Sun, 30 Jul 2023 17:06:22 +0000 (UTC)
From: vezhlys@gmail.com
Reply-To: vezhlys@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Cherry G80-3000N keyboard leaks part of device information to output
X-Send-Pr-Version: www-1.0

>Number:         57553
>Category:       kern
>Synopsis:       Cherry G80-3000N keyboard leaks part of device information to output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 30 17:10:00 +0000 2023
>Originator:     Andrius V
>Release:        current, 10
>Organization:
>Environment:
NetBSD 10.0_BETA (GENERIC_AMDGPU) #10: Tue Jul 25 13:58:42 EEST 2023
>Description:
Cherry G8-3000N USB keyboard leaks some device information to console o an active text input on attachment. Once attached, it can print to console text like "iry~[13~[19~[21~", "iry~~" or similar letters (or parts of it). If it happens in login screen, it actually inputs it like a username with seemingly new line symbol, triggering to switch to "password" input (or it can print this text to any input like text editor, browser text input, if they are in focus on the point of attachment). Since I am using USB switch between two computers, I can observe the issue pretty often. Keyboard doesn't have additional USB ports, so nothing is additionally attached to it. This happens on NetBSD 10 and current (at time of writing) at least.
dmesg on attached keyboard:
uhidev3 at uhub5 port 3 configuration 1 interface 0
uhidev3: CHERRY (0x046a) CHERRY Keyboard (0x00e0), rev 2.00/1.02, addr 7, iclass 3/1
ukbd0 at uhidev3
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev4 at uhub5 port 3 configuration 1 interface 1
uhidev4: CHERRY (0x046a) CHERRY Keyboard (0x00e0), rev 2.00/1.02, addr 7, iclass 3/1
uhidev4: 5 report ids
ukbd1 at uhidev4 reportid 1
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhid3 at uhidev4 reportid 2: input=1, output=0, feature=0
uhid4 at uhidev4 reportid 3: input=2, output=0, feature=0
uhid5 at uhidev4 reportid 4: input=63, output=63, feature=0
ums1 at uhidev4 reportid 5: 5 buttons, W and Z dirs
wsmouse1 at ums1 mux 0

$ usbhidctl -f /dev/uhid3 -r -vvvv
report ID=2
Report descriptor:
item: kind=3 repid=2 usage=0x10080
Collection page=Generic_Desktop usage=System_Control (1:0x80)
item: kind=0 repid=2 usage=0x10081
Input   size=1 count=1 page=Generic_Desktop usage=System_Power_Down (1:0x81), logical range 0..1
item: kind=0 repid=2 usage=0x10082
Input   size=1 count=1 page=Generic_Desktop usage=System_Sleep (1:0x82), logical range 0..1
item: kind=0 repid=2 usage=0x10083
Input   size=1 count=1 page=Generic_Desktop usage=System_Wake_Up (1:0x83), logical range 0..1
item: kind=0 repid=2 usage=0x0
Input   size=5 count=1 Const page=0x0000 usage=0x0000 (0:0x0), logical range 0..1
item: kind=4 repid=2 usage=0x0
End collection
Total   input size 1 bytes
Total  output size 0 bytes
Total feature size 0 bytes

$ usbhidctl -f /dev/uhid4 -r -vvvv
report ID=2
Report descriptor:
item: kind=3 repid=2 usage=0x10080
Collection page=Generic_Desktop usage=System_Control (1:0x80)
item: kind=0 repid=2 usage=0x10081
Input   size=1 count=1 page=Generic_Desktop usage=System_Power_Down (1:0x81), logical range 0..1
item: kind=0 repid=2 usage=0x10082
Input   size=1 count=1 page=Generic_Desktop usage=System_Sleep (1:0x82), logical range 0..1
item: kind=0 repid=2 usage=0x10083
Input   size=1 count=1 page=Generic_Desktop usage=System_Wake_Up (1:0x83), logical range 0..1
item: kind=0 repid=2 usage=0x0
Input   size=5 count=1 Const page=0x0000 usage=0x0000 (0:0x0), logical range 0..1
item: kind=4 repid=2 usage=0x0
End collection
Total   input size 1 bytes
Total  output size 0 bytes
Total feature size 0 bytes

$ usbhidctl -f /dev/uhid4 -r -vvvv
report ID=3
Report descriptor:
item: kind=0 repid=3 usage=0xc0000
Input   size=16 count=1 Array page=Consumer usage=Unassigned..0x1fff (12:0x0..12:0x1fff), logical range 0..8191
item: kind=3 repid=3 usage=0xc0001
Collection page=Consumer usage=Consumer_Control (12:0x1)
Total   input size 2 bytes
Total  output size 0 bytes
Total feature size 0 bytes

$ usbhidctl -f /dev/uhid5 -r -vvvv 
report ID=4
Report descriptor:
item: kind=1 repid=4 usage=0xff1c0000
Output  size=8 count=63 Array page=0xff1c usage=0x0000..0x0000 (65308:0x0..65308:0xff), logical range 0..255
item: kind=0 repid=4 usage=0xff1c0000
Input   size=8 count=63 Array page=0xff1c usage=0x0000..0x0000 (65308:0x0..65308:0xff), logical range 0..255
item: kind=3 repid=4 usage=0xff1c0092
Collection page=0xff1c usage=0x0092 (65308:0x92)
Total   input size 63 bytes
Total  output size 63 bytes
Total feature size 0 bytes
>How-To-Repeat:
Reconnect the keyboard physically or using USB switch.
>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.