Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbc15724 authored by Krishnankutty Kolathappilly's avatar Krishnankutty Kolathappilly Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: cpp: Fix unprotected userspace access



After enabling KASan, unprotected userspace access causes
a PTE translation fault as it can covers only kernel memory
region. Following is the crash error for the reference.

[  490.361698] BUG: KASan: user-memory-access on address
  00000000f03ff9a8
[  490.368199] Read of size 8 by task CAM_cpp/4309
[  490.372758] Call trace:
[  490.373206]  MSM8996 LowLatency: ASoC: failed to start some
 BEs -19
[  490.381429] [<ffffffc000089ec4>] dump_backtrace+0x0/0x1c4
[  490.386815] [<ffffffc00008a098>] show_stack+0x10/0x1c
[  490.391841] [<ffffffc001138ffc>] dump_stack+0x74/0xc8
[  490.396861] [<ffffffc0002155b8>]
 kasan_report_user_access+0x80/0xa8
[  490.403107] [<ffffffc000214554>] __asan_load8+0x30/0x90
[  490.408305] [<ffffffc000a7e7fc>]
 msm_cpp_subdev_fops_compat_ioctl+0x1330/0x180c
[  490.415631] [<ffffffc0009d5a7c>] v4l2_compat_ioctl32+0xb8/0xe0
[  490.421455] [<ffffffc000283fe4>] compat_SyS_ioctl+0x1ac/0x1a18
[  490.427223] =================================================

Change-Id: Ic5d2502a84f0b8675e8cb3d2d7f29260a1172ed4
Signed-off-by: default avatarKrishnankutty Kolathappilly <kkolatha@codeaurora.org>
parent a956413b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment