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: <Pine.LNX.4.44L0.1710031248320.1500-100000@iolanthe.rowland.org>
Date:   Tue, 3 Oct 2017 12:50:08 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Takashi Iwai <tiwai@...e.de>
cc:     Andrey Konovalov <andreyknvl@...gle.com>,
        <alsa-devel@...a-project.org>,
        Arvind Yadav <arvind.yadav.cs@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Sakamoto <o-takashi@...amocchi.jp>,
        LKML <linux-kernel@...r.kernel.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Kostya Serebryany <kcc@...gle.com>,
        syzkaller <syzkaller@...glegroups.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <linux-usb@...r.kernel.org>
Subject: Re: usb/sound/bcd2000: warning in bcd2000_init_device

On Tue, 3 Oct 2017, Takashi Iwai wrote:

> > It's a dev_WARN because it indicates a potentially serious error in the 
> > driver: The driver has submitted an interrupt URB to a bulk endpoint.  
> > That may not sound bad, but the same check gets triggered if a driver 
> > submits a bulk URB to an isochronous endpoint, or any other invalid 
> > combination.
> > 
> > Most likely the explanation here is that the driver doesn't bother to
> > check the endpoint type because it expects the endpoint will always be
> > interrupt.  But that is not a safe strategy.  USB devices and their
> > firmware should not be trusted unnecessarily.
> > 
> > The best fix is, like you said, to add a sanity check in the caller.
> 
> OK, but then do we have some handy helper for the check?
> As other bug reports by syzkaller suggest, there are a few other
> drivers that do the same, submitting a urb with naive assumption of
> the fixed EP for specific devices.  In the end we'll need to put the
> very same checks there in multiple places.

Perhaps we could add a helper routine that would take a list of 
expected endpoint types and check that the actual endpoints match the 
types.  But of course, all the drivers you're talking about would have 
to add a call to this helper routine.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ