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-next>] [day] [month] [year] [list]
Date:	Fri, 15 Feb 2013 12:46:55 +0100
From:	David Herrmann <dh.herrmann@...glemail.com>
To:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:	linux-api@...r.kernel.org, linux-input@...r.kernel.org,
	Jiri Kosina <jkosina@...e.cz>,
	RavindranathX Doddi <ravindranathx.doddi@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Marcel Holtmann <marcel@...tmann.org>,
	Johan Hedberg <johan.hedberg@...il.com>
Subject: Re: uhid: broken interface: 32/64-bit compatibility

Hi Kirill

On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov
<kirill.shutemov@...ux.intel.com> wrote:
> Hi David and all,
>
> There's claim in uhid.h that the interface is "compatible even between
> architectures". But it obviously is not true: struct uhid_create_req
> contains pointer which breaks everything.
>
> The easy way to demonstrate the issue is compile uhid-example.c with -m32
> and try to run it on 64 bit kernel. Creating of the device will fail.

Indeed, we missed that. We should probably also notify the HIDP
developers as "struct hidp_connadd_req" suffers from the same
problems. (CC'ed)

> I don't see an easy way to fix this. Few options:
>
> 1. Replace the pointer with u64. It will fix the issue, but it breaks ABI
>    which is never a good idea. Not sure how many users interface already
>    has.

The only users I am aware of is an HID debugging tool and experimental
HoG Bluetooth support (bluez). Maybe Marcel or Johan can comment
whether this is already used by bluez-5? If it is, then we shouldn't
break ABI and go with #2+#3. Otherwise, I think changing to u64 should
be ok.
On the other hand, it would break any future build for older stable
kernels so not breaking ABI is probably the best idea. Any comments? I
can add a COMPAT fix and a comment to fix this in the next version of
UHID_CREATE.

Thanks!
David
--
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