android_kernel_oneplus_msm8998/drivers/infiniband
Michael Mera 45c679be34 IB/ocrdma: fix out of bounds access to local buffer
commit 062d0f22a30c39840ea49b72cfcfc1aa4cc538fa upstream.

In write to debugfs file 'resource_stats' the local buffer 'tmp_str' is
written at index 'count-1' where 'count' is the size of the write, so
potentially 0.

This patch filters odd values for the write size/position to avoid this
type of problem.

Signed-off-by: Michael Mera <dev@michaelmera.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-15 17:42:06 +02:00
..
core IB/core: Make testing MR flags for writability a static inline function 2018-08-15 17:42:06 +02:00
hw IB/ocrdma: fix out of bounds access to local buffer 2018-08-15 17:42:06 +02:00
ulp IB/ipoib: Fix for potential no-carrier state 2018-05-30 07:48:55 +02:00
Kconfig RDMA/ucm: Mark UCM interface as BROKEN 2018-07-17 11:31:46 +02:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00