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: <20211122112526.501c5f66@Zen-II-x12.niklas.com>
Date:   Mon, 22 Nov 2021 11:25:26 -0500
From:   David Niklas <Hgntkwis@...mail.net>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-input@...r.kernel.org
Subject: Re: I need advice with UPS connection. (ping)

On Sat, 20 Nov 2021 21:54:20 -0500
Alan Stern <stern@...land.harvard.edu> wrote:
> On Fri, Nov 19, 2021 at 05:19:15PM -0500, David Niklas wrote:
> > On Wed, 17 Nov 2021 12:08:17 -0500
> > Alan Stern <stern@...land.harvard.edu> wrote:  
<snip>
> > > This will cause the kernel to ask for 1060 bytes rather than 996.
> > > (It's also potentially dangerous, because it asks for 1060 bytes to
> > > be stored into a 996-byte buffer; if the device sends more data than
> > > expected then the excess will be written beyond the end of the
> > > buffer.)
> > > 
> > > Please send a usbmon trace showing what happens with this patch
> > > applied. And you might as well put the Set-Idle request back in,
> > > because now we know Windows does send that request.
> > >   
> > <snip>
> > 
> > It still disconnects. I've attached the usbmon output.  
> 
> The trace clearly shows the request for a 1060-byte HID report 
> descriptor and the device sending back a 996-byte reply, just like in 
> Windows.  And yet the disconnect still occurs.
> 
> The only remaining difference is the transfer of string descriptors.  
> You can prevent Linux from asking for them by editing usb_string() in 
> drivers/usb/core/message.c.  Just make the function return -ENOMEM 
> unconditionally.  That will stop the requests from going out.
> 
> Alan Stern
> 

Ok, I first edited the kernel to return -ENOMEM like you suggested but
the UPS still disconnected. I then edited it again to re-add the 1060
byte request and the UPS still disconnected.

I'm attaching the usbmon traces.
If you need any additional info I'll do my best to provide it.

Thanks,
David

Download attachment "mon3.txt.bz2" of type "application/x-bzip" (1620 bytes)

Download attachment "mon4.txt.bz2" of type "application/x-bzip" (1627 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ