]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Do not allow the user to write to the clock page
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Apr 2019 11:07:25 +0000 (14:07 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 24 Apr 2019 16:06:24 +0000 (13:06 -0300)
commitf46c08ade650a1e0c648ee89dda5b80846c9aad0
tree20fed69f72f0cfb9e5acc778c79c1d7a13c07d38
parent05fd4388dc16fb9ff5e39e2adc2be5ace89ee7ca
RDMA/mlx5: Do not allow the user to write to the clock page

The intent of this VMA was to be read-only from user space, but the
VM_MAYWRITE masking was missed, so mprotect could make it writable.

Cc: stable@vger.kernel.org
Fixes: a27637c96fab ("IB/mlx5: Mmap the HCA's clock info to user-space")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/hw/mlx5/main.c