RE: [PATCH] RDMA/siw: Fix missing permission check in user buffer registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Friday, 16 December 2022 19:35
> To: Bernard Metzler <BMT@xxxxxxxxxxxxxx>
> Cc: linux-rdma@xxxxxxxxxxxxxxx; leonro@xxxxxxxxxx; David.Laight@xxxxxxxxxx
> Subject: [EXTERNAL] Re: [PATCH] RDMA/siw: Fix missing permission check in
> user buffer registration
> 
> On Fri, Dec 16, 2022 at 07:32:09PM +0100, Bernard Metzler wrote:
> > User communication buffer registration lacks check of access
> > rights for provided address range. Using pin_user_pages_fast()
> > instead of pin_user_pages() during user page pinning implicitely
> > introduces the necessary check. It furthermore tries to avoid
> > grabbing the mmap_read_lock.
> 
> Huh? What access check?
> 

        if (unlikely(!access_ok((void __user *)start, len)))
                return -EFAULT;

Seems I have to work on the commit message 😉


pin_user_pages_fast() -> internal_get_user_pages_fast() -> access_ok()


siw needs to call access_ok() during user buffer registration.
Which is done by pin_user_pages_fast(), but not by pin_user_pages()







[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux