Thread (1 message) 1 message, 1 author, 2016-05-26

Re: [RFC] rdma/uverbs: Sketch for an ioctl framework

From: Jason Gunthorpe <hidden>
Date: 2016-05-26 18:43:48

On Thu, May 26, 2016 at 06:07:02PM +0000, Liran Liss wrote:
However, I think that processing object locking before validation is not secure.
A malicious user could easily cause a deadlock due to ordering.
Hum, interesting point. I wonder if we already have bugs there today?

I'd say that is actually more likely to happen if it is open
coded. Nested object locking like that requires consistent ordering to
avoid deadlock..

It would be easier for the core code to enforce consistent nested lock
acquire ordering than to try and do that scattered across all the
code. You are right, the core code cannot just iterate over the
provided object list and grab the locks.

One very simple option is for the core to enforce a sort order on the
object list as it grabs the locks and fail&unwind for unordered lists.

Parameter validation doesn't really factor into this problem....

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help