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]
Message-ID: <20081014031244.GE8594@anvil.corenet.prv>
Date:	Mon, 13 Oct 2008 23:12:44 -0400
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Matthew Garrett <mjg59@...f.ucam.org>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Add KD_X console mode to avoid keyboard passthrough

Hi Matthew,

On Sun, Oct 12, 2008 at 06:47:10PM +0100, Matthew Garrett wrote:
> When using the evdev input driver, X currently claims the devices 
> exclusively in order to prevent characters leaking through to the 
> underlying VT. This has the downside that other consumers of input 
> events no longer receive the keys - rfkill and mouseemu no longer work 
> in the kernel, and hal is unable to pass through input events. Removing 
> the exclusive access results in events being passed through to the 
> underlying VT, which may result in leaking sensitive information.
> 
> This patch adds an extra KD_X mode. It's semantically identical to 
> KD_GRAPHICS, except that keyboard events are no longer sent to the 
> console device. This allows X to avoid exclusive access without breaking 
> any applications which depend upon the existing KD_GRAPHICS semantics.
> 

Is this really needed? The current X does not leak anything onto its VT
and the new one should not have either, unless they forget to switch
virtual console into raw mode. Plus, if you make everything work with
KD_GRAPHICS you don't have to have new kernel.

> 
> diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
> index 7b3a212..b0b8285 100644
> --- a/drivers/char/keyboard.c
> +++ b/drivers/char/keyboard.c
> @@ -1298,6 +1298,10 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
>  static void kbd_event(struct input_handle *handle, unsigned int event_type,
>  		      unsigned int event_code, int value)
>  {
> +	struct vc_data *vc = vc_cons[fg_console].d;
> +
> +	if (vc->vc_mode == KD_X)
> +		return;

This surely kills SysRq handling.

>  	if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))
>  		kbd_rawcode(value);
>  	if (event_type == EV_KEY)
-- 
Dmitry
--
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