lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Jun 2008 17:10:28 +0200
From:	Jiri Bohac <jbohac@...e.cz>
To:	Samuel Thibault <samuel.thibault@...-lyon.org>,
	Jiri Bohac <jbohac@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] console keyboard mapping broken by 04c71976

On Wed, Jun 11, 2008 at 03:03:04PM +0100, Samuel Thibault wrote:
> Err, at quick look it looks to me rather like a bug kbd, which doesn't
> cope with the console being in unicode mode.  Which distribution are you
> using?
> 
> In unicode mode, k_self is really meant to hold unicode values (there is
> no other way to provide an arbitrary unicode value in keyboard maps),
> and thus kbd should translate KT_LETTER's value from the map file's
> encoding (set by the charset directive) to unicode.

I am actually hunting down a bug this causes in openSUSE. We use
kbd-1.12. kbd does not translate anything to unicode - there is
no space for that in the 8 bits the keycode uses for the value.
The kernel needs to take care for the conversion.

I'll demonstrate the problem on tracing kbd_keycode() in
drivers/char/keyboard.c when the key "2" (keycode 3) is pressed.
The expected result is the letter letter "e" with a caron [CARON]
accent, code 0xec in iso-8859-2 [88592].

The keysym for this key in the Czech keyboard is set to 0xbec
by a call to KDSKBENT, which stores it as 0xfbec in the map.

	...
	type = KTYP(keysym);		// 0xfb
	...
	type -= 0xf0;			// 0xb
        if (type == KT_LETTER) {	// true
                type = KT_LATIN;	// 0
 
	...
        (*k_handler[type])(vc, keysym & 0xff, !down); 
		// calls k_self, note there is really no space for a 
		// full unicode representation ;-)

So, we need to perform the conversion in k_self (or later).  Your
patch removed it from k_unicode, but only does it in k_self when
the keyboard mode is not VC_UNICODE.

[CARON]: http://en.wikipedia.org/wiki/Caron
[88592]: http://en.wikipedia.org/wiki/Iso-8859-2

Regards,

-- 
Jiri Bohac <jbohac@...e.cz>
SUSE Labs, SUSE CZ

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ