Re: Re another alternative to resolve hardened user copy warnings

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

 



On 8/25/20 11:53 AM, Jason Gunthorpe wrote:
> On Tue, Aug 25, 2020 at 11:37:52AM -0500, Bob Pearson wrote:
> 
>> Currently only the rxe driver is exhibiting the issue of kernel
>> warnings during qp create caused by recent kernel changes looking
>> for potential information leaks to user space. The test which
>> triggers this warning is very specific. It occurs when a portion of
>> a kernel object stored in a slab cache is copied to user space and
>> the copied area has not been 'whitelisted' by setting useroffset and
>> usersize parameters for the kmem cache. As already discussed there
>> are two ways to mitigate this
> 
> I think we should just add a uverbs_copy_to() for integers, much like
> netlink does.
> 
> We already have various getters for integers..
> 
> Jason
> 

Perhaps. But I think the proposed fix is good in any case. It gets rid of a bunch of code that doesn't add anything.
The info leak police will come after kmalloc too. It is just a harder problem so your suggestion will still be a good one.



[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