android_kernel_sony_sdm845/drivers/video/adf
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Greg Hackmann 182cedfd90 video: adf: zero out mapping data on adf_buffer_map() failure
If the following call chain fails

adf_device_post_nocopy() ->
  adf_buffer_map() ->
    dma_buf_attach(); dma_buf_map_attachment()

then the attachment returned by dma_buf_attach() will get cleaned up
twice: first during the error-handling path inside adf_buffer_map(), and
again during the error-handling path inside adf_device_post_nocopy().

Fix this by zeroing out the mapping data inside adf_buffer_map()'s
error-handling path.  When adf_device_post_nocopy() hands it back to
adf_buffer_mapping_cleanup(), it will deliberately skip over zeroed-out
data.

(The second adf_buffer_mapping_cleanup() call inside
adf_device_post_nocopy() is not a bug; it's intended to clean up after
any *other* buffers we handled as part of this request.)

CVE:CVE-2016-3811

Bug: 28025945
Bug: 28279077

Change-Id: I824d980b208da3a15d35f74970755c8f18500263
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: 4436de7a92d037599e0d217f16f9c391b6ad866a
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
2017-08-08 18:38:53 -07:00
..
adf.c video: adf: Cleanup sw_sync timeline at adf_device_destroy 2016-08-08 12:02:17 +05:30
adf.h video: adf: expose adf_modeinfo_set_{name,vrefresh} to drivers 2016-08-08 12:02:17 +05:30
adf_client.c video: adf: zero out mapping data on adf_buffer_map() failure 2017-08-08 18:38:53 -07:00
adf_fbdev.c video: adf: fix wrong bitops in adf_modeinfo_to_fb_videomode() 2016-08-08 12:02:17 +05:30
adf_fops.c video: adf: build fixes for 4.1 2016-08-08 12:02:17 +05:30
adf_fops.h
adf_fops32.c video: adf: fix compat ioctls calling ioctl with wrong cmd 2016-08-08 12:02:17 +05:30
adf_fops32.h video: adf: ensure consistent alignment on userspace facing structs 2016-08-08 12:02:17 +05:30
adf_format.c
adf_memblock.c video: adf: build fixes for 4.1 2016-08-08 12:02:17 +05:30
adf_sysfs.c video: adf: make device node names less hierarchical 2016-08-08 12:02:17 +05:30
adf_sysfs.h
adf_trace.h
Kconfig video: adf: Set ADF_MEMBLOCK to boolean 2016-08-08 12:02:17 +05:30
Makefile video: adf: Fix modular build 2016-08-08 12:02:17 +05:30