Integer overflow and signedness issue in camera JPEG engines (CVE-2013-4736)

Release Date: 
August 29, 2013
Advisory ID: 

The following security vulnerability has been identified in the MSM JPEG engine drivers (Gemini JPEG encoder, Mercury JPEG decoder, Jpeg1.0 common encoder/decoder).

The JPEG engines that are part of the camera driver provide an ioctl system call interface to user space clients for communication. When processing hardware commands ioctl calls, the drivers are incorrectly handling the number of commands included in the user space payload. This can lead to an integer overflow which subsequently results in the driver attempting to process hardware commands from out-of-bounds memory which can cause the kernel to crash. The same code also suffered from incorrectly treating the number of hardware commands as signed.

Access Vector: local
Security Risk: medium
Vulnerability: integer overflow (CWE-190)

Affected versions
All Android releases from CAF using the Linux kernel from the following heads:

  • msm-3.*
  • jb*
  • ics*
  • gingerbread*

We advise customers to apply the following patches for individual branches.

Individual Patches


Qualcomm Innovation Center, Inc. (QuIC) thanks for reporting the related issues and working with QuIC to help improve Android device security.


Initial revision