]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: host: check if offset is u32 aligned
authorDeepak Nibade <dnibade@nvidia.com>
Fri, 11 Mar 2016 08:29:20 +0000 (13:59 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 15 Mar 2016 18:41:31 +0000 (11:41 -0700)
commit422baa09a17a6a17f4e572aa5441ca174634de0d
treef0967e83e0dd0696b645312f098a226c8c7da502
parentb2cae8de584e8296187530f8e449958dd1317f28
video: tegra: host: check if offset is u32 aligned

In nvhost_ioctl_ctrl_module_regrdwr(), we copy offset
to read/write from user space but we do not have
any check on it

So it is possible for user space to add unaligned
offset and request read/write which would crash the
system

Fix this by explicitly checking alignment of the
offset passed by user space

Bug 1739935

Change-Id: Iea2a07c60500af876b732a0e9d9d08535aa53b5c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1029405
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/video/tegra/host/bus_client.c