Thread (4 messages) flat view 4 messages, 3 authors, 2018-01-17

Re: [PATCH 32/32] aio: implement io_pgetevents

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: 2018-01-17 04:27:25
Also in: linux-fsdevel, lkml, netdev

Possibly related (same subject, not in this thread)

On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote:
 	if (sigmask) {
-		if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask)))
+		if (!access_ok(VERIFY_READ, sigmask,
+			       sizeof(void *) + sizeof(size_t)) ||
+		    __get_user(up, (sigset_t __user * __user *)sigmask) ||
+		    __get_user(sigsetsize,
+			       (size_t __user *)(sigmask + sizeof(void *))))
 			return -EFAULT;
How about copy_from_user() on a struct?  Making eyes bleed is fun, but
people tend to get annoyed when you do it to them...

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help