v4l2 can crash computer with badly written userland code

Bug #1489077 reported by SA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

In my simple bit of code to grab a frame from a webcam based on the example code given here:

https://gist.github.com/Circuitsoft/1126411

I found a badly crafted version would crash the computer (dead except for flashing keyboard lights).

Simply calling ioctl(cam, VIDIOC_STREAMON, &buf.type) twice without calling VIDIOC_STREAMOFF inbetween causes the crash. I realise this code is incompetent but it shouldn't require a hard reboot to recover from it. I guess this might be rather system specific however it seemed worth reporting.

 I can't recall the last time I managed to crash a linux box from userland...

Kernel: Ubuntu 3.13.0-62.102-generic 3.13.11-ckt24

Camera: Bus 001 Device 002: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1489077

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.2 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.