linux/drivers/infiniband
Viresh Kumar 7ee23491b3 RDMA/qib: Validate ->show()/store() callbacks before calling them
The permissions of the read-only or write-only sysfs files can be
changed (as root) and the user can then try to read a write-only file or
write to a read-only file which will lead to kernel crash here.

Protect against that by always validating the show/store callbacks.

Link: https://lore.kernel.org/r/d45cc26361a174ae12dbb86c994ef334d257924b.1573096807.git.viresh.kumar@linaro.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-11-14 11:49:15 -04:00
..
core RDMA: Change MAD processing function to remove extra casting and parameter 2019-11-12 20:20:15 -04:00
hw RDMA/qib: Validate ->show()/store() callbacks before calling them 2019-11-14 11:49:15 -04:00
sw RDMA/siw: Use the common mmap_xa helpers 2019-11-06 13:08:01 -04:00
ulp RDMA/srpt: Report the SCSI residual to the initiator 2019-11-13 15:50:41 -04:00
Kconfig RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00