Resources

Monday, December 17, 2012

Just Another Mobile Phone Blog: [ROOT][SECURITY] Root exploit on Exynos

Blogtrottr
Just Another Mobile Phone Blog
// via fulltextrssfeed.com
[ROOT][SECURITY] Root exploit on Exynos
Dec 17th 2012, 20:20


Hi,

Recently discover a way to obtain root on S3 without ODIN flashing.
The security hole is in kernel, exactly with the device /dev/exynos-mem.
This device is R/W by all users and give access to all physical memory  ... what's wrong with Samsung ?
Its like /dev/mem but for all.
Three libraries seems to use /dev/exynos-mem:

  • /system/lib/hw/camera.smdk4x12.so
  • /system/lib/hw/gralloc.smdk4x12.so
  • /system/lib/libhdmi.so

Many devices are concerned :
  • Samsung Galaxy S2
  • Samsung Galxy Note 2
  • MEIZU MX
  • potentialy all devices who embed exynos processor (4210 and 4412) which use Samsung kernel sources.
The good news is we can easily obtain root on these devices and the bad is there is no control over it.

Ram dump, kernel code injection and others could be possible via app installation from Play Store. It certainly exists many ways
to do that but Samsung give an easy way to exploit. This security hole is dangerous and expose phone to malicious apps.
Exploitation with native C and JNI could be easily feasible.

Edited
Some details :
/dev/exynos-mem seems to be used for graphic usage like camera, graphic memory allocation, hdmi.
By activating pid display in kmsg, surfaceflinger do mmap on the device (via one of the three shared libraries above ?? I have not see reference in binary to these libraires)

The operations allowed on the device are (from linux/drivers/char/mem.c) :

Code:

  static const struct file_operations exynos_mem_fops = {      .open       = exynos_mem_open,      .release    = exynos_mem_release,      .unlocked_ioctl = exynos_mem_ioctl,      .mmap       = exynos_mem_mmap,  }  
and the default permissions (from linux/drivers/char/mem.c) :

Code:

  #ifdef CONFIG_EXYNOS_MEM      [14] = {"exynos-mem", S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH              | S_IWOTH, &exynos_mem_fops},  

0 comments:

Post a Comment

Powered by Blogger.