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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130916221337.GS25896@mwanda>
Date:	Tue, 17 Sep 2013 01:13:37 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	KY Srinivasan <kys@...rosoft.com>
Cc:	"olaf@...fle.de" <olaf@...fle.de>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"vojtech@...e.cz" <vojtech@...e.cz>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"apw@...onical.com" <apw@...onical.com>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>
Subject: Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V
 synthetic keyboard

On Mon, Sep 16, 2013 at 09:55:44PM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: Dan Carpenter [mailto:dan.carpenter@...cle.com]
> > Sent: Monday, September 16, 2013 1:13 PM
> > To: KY Srinivasan
> > Cc: olaf@...fle.de; gregkh@...uxfoundation.org; jasowang@...hat.com; Dmitry
> > Torokhov; linux-kernel@...r.kernel.org; vojtech@...e.cz; linux-
> > input@...r.kernel.org; apw@...onical.com; devel@...uxdriverproject.org
> > Subject: Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V
> > synthetic keyboard
> > 
> > On Mon, Sep 16, 2013 at 06:42:25PM +0000, KY Srinivasan wrote:
> > > Dan,
> > >
> > > Rolling the changes you have indicated is not the issue; this can trivially be
> > done.
> > > My contention is that it is not needed given that the underlying function is
> > already
> > > doing that. Look at the function  vmbus_recvpacket_raw() in
> > drivers/hv/channel.c.
> > >
> > 
> > I'm confused.
> > 
> > There is no mention of ->offset8 in vmbus_recvpacket_raw().
> 
> As you can see the vmbus_recvpacket_raw() ensures that the complete
> packet is read and if the buffer specified is not large enough nothing is 
> read. The packet header has information about the length of the packet
> and the offset where the payload is.  
> > 

No one is talking about the ->len8.  I'm saying that we should check
->offset8.

> > It's a good idea to add a check there but the lower levels don't know
> > about the sizeof(synth_kbd_protocol_response) so we would still need
> > something like my check.
> 
> Why would the lower level code need to know  anything about the layout of a
> particular message type. The lower level code is guaranteeing that a complete
> packet has been read in and that should be sufficient - assuming we trust the host.
> 

Of course, we don't need to check anything if we trust the host.  I said
that already.  Just add the check for robustness.

> We have already spent more time on this than we should; I will make the necessary
> changes.

Thank you.

regards,
dan carpenter

--
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