Re: [Bug 1827452] Re: null pointer dereference in uvcvideo

2022-01-18 Thread John Boero
If you encounter uvc_disconnect then you may have a different issue than I do. I can clearly see via debugging that uvc_disconnect is never reached. In my case the disconnect is happening in usb/core/hub.c:usb_disconnect. The comment on top if this function says "This call is synchronous, and

Re: [Bug 1827452] Re: null pointer dereference in uvcvideo

2022-01-18 Thread John Boero
Sorry I kept the thin USB extension cable that I used to reproduce this. I will try the patch in #23 over the next week or so when I can find time. I still don't think it will have any effect though as the issue seems to be in usbcore. Happy to see once and for all. John On Tue, Jan 18, 2022

Re: [Bug 1827452] Re: null pointer dereference in uvcvideo

2022-01-15 Thread John Boero
Sorry this only seems reproducible in a scenario a USB switch or cable that doesn't support enough amps for the device. Any device or webcam which overloads its power supply and then disconnects during UVC initialization will disconnect itself during a critical period in the kernel where an

[Bug 1827452] Re: null pointer dereference in uvcvideo

2021-01-19 Thread John Boero
Sorry I've been reluctant to test it since that code block is never even hit during the issue. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1827452 Title: null pointer dereference in uvcvideo To

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-22 Thread John Boero
@kaihengfeng The usb disconnect comes directly via interrupt. Execution doesn't hit uvc_disconnect and this patch has no effect. :/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1827452 Title:

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-22 Thread John Boero
Thanks I finally managed to set up the same test cable and give this patch a go. I still see the same error - third attempt in the trace attached. I'm still of the opinion that this would need to be fixed in usbcore. ** Attachment added: "dmesg failure on 3rd attempt"

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-15 Thread John Boero
Thanks I will test as soon as I get some time (weekend). I have to hook up my shoddy tester USB cable and compile a fresh kernel but in the meantime trying to get business wrapped up before holidays. -- You received this bug notification because you are a member of Ubuntu Bugs, which is

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-11 Thread John Boero
There it is: https://lore.kernel.org/linux- media/CAO5W59geLtP7kHJkW=ELusAcd9==ceqhsuzznukfradtkxz...@mail.gmail.com/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1827452 Title: null pointer

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-11 Thread John Boero
Yes this was the original thread. Alan was helpful and responsive but in the end he suggested I contact the uvcvideo maintainers which I did and got nowhere. https://lore.kernel.org/linux- usb/20201123152654.gb708...@rowland.harvard.edu/#t The 2nd patch was to uvcvideo maintainers Laurent

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-10 Thread John Boero
I shared the stack trace. Was there a reply somewhere I didn't get? Is it on lkms? Link? With UVC trace on: [ 638.729455] uvcvideo: uvc_v4l2_open [ 638.824646] uvcvideo: Resuming interface 0 [ 638.824648] uvcvideo: Resuming interface 1 [ 638.825644] uvcvideo: uvc_v4l2_release [

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-12-09 Thread John Boero
Hi latest on this. I've played with about 50 custom kernel patches here and I can see exactly what happens. When uvcvideo looks for webcam devices it finds a perfectly healthy idle webcam on the USB hub (even built-in hub). Then when it starts a stream the webcam obviously requires more power.

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-11-15 Thread John Boero
Update again. The kernel maintainers have been helpful but prefer NULL checking to be done in the drivers, not in the kernel. I've explored further with some test builds and it turns out the NULL is actually on the dev config interfaces (usb.c:281 current line). During initialization the

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-11-12 Thread John Boero
Update on this. Pretty sure I managed to find the line in the kernel triggering this. I've submitted a PR to the kernel USB maintainers. Hopefully tested and merged soon. https://github.com/torvalds/linux/commit/a40519014549f60969c8e67a2fd91426db05fe04 -- You received this bug notification

[Bug 1827452] Re: null pointer dereference in uvcvideo

2020-11-12 Thread John Boero
I know this is closed but I've been having this same issue for months as well. In fact I tried a different webcam from a different vendor and I see the same behaviour. Linux 5.8.18-200.fc32.x86_64 #1 SMP Mon Nov 2 19:49:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Just adding this for the record,