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:	Tue, 3 Mar 2015 21:42:49 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Alexander Holler <holler@...oftware.de>,
	Richard Weinberger <richard.weinberger@...il.com>,
	USB list <linux-usb@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, Felipe Balbi <balbi@...com>
Subject: Re: gadgetfs broken since 7f7f25e8

On Tue, Mar 03, 2015 at 10:47:14AM -0500, Alan Stern wrote:
> On Tue, 3 Mar 2015, Al Viro wrote:
> 
> > Looking at that thing again...  why do they need to be dummy?  After all,
> > those methods start with get_ready_ep(), which will fail unless we have
> > ->state == STATE_EP_ENABLED.  So they'd be failing just fine until that
> > first write() anyway.  Let's do the following:
> 
> In addition to the changes you made, it looks like you will need the 
> following or something similar (also untested).  I'm not sure if this 
> is race-free, but it's better than before.

Right, ep0 has the same kind of problem...


> @@ -1240,6 +1241,10 @@ static int
>  ep0_fasync (int f, struct file *fd, int on)
>  {
>  	struct dev_data		*dev = fd->private_data;
> +
> +	if (dev->state <= STATE_DEV_OPENED)
> +		return -ENODEV;
> +

Er...  What is protecting dev->state here?  Matter of fact, what's the
point of that check at all?  Right now you have .fasync = ep0_fasync
both in ep0_io_operations and in dev_init_operations, so your delta
changes the existing semantics...
--
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