]> git.baikalelectronics.ru Git - kernel.git/commit
mm: cma: fix incorrect type conversion for size during dma allocation
authorRohit Vaswani <rvaswani@codeaurora.org>
Thu, 22 Oct 2015 20:32:11 +0000 (13:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Oct 2015 08:55:10 +0000 (17:55 +0900)
commit46c3b0dc7d09fc44566e26efeac82a7d0248ebe4
tree7bc4c737953328c9deda1704bcfb1d7432b4b6b2
parentd5454e421ed731eb61c7cbdba93026eafa323d1c
mm: cma: fix incorrect type conversion for size during dma allocation

This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.

  show_stack+0x10/0x1c
  dump_stack+0x74/0xc8
  kasan_report_error+0x2b0/0x408
  kasan_report+0x34/0x40
  __asan_storeN+0x15c/0x168
  memset+0x20/0x44
  __dma_alloc_coherent+0x114/0x18c

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/base/dma-contiguous.c
include/linux/cma.h
include/linux/dma-contiguous.h
mm/cma.c