Thread (1 message) 1 message, 1 author, 2009-01-07

Re: [patch 260/266] loop: add ioctl to resize a loop device

From: <hidden>
Date: 2009-01-07 06:13:46

Andrew Morton:
quoted
There is apparently no security checking here. No way can we allow this 
for any random user that can open the loopback device read-only and then 
just change its size.

It needs to use all the same security checks as "loop_set_status()" and 
friends, afaik.
oops, didn't think of that.
I will add some security checks and send a new patch. But it may not be
purely same to loop_set_status() since the checks for encrypt_key or
something is unnecessary.

This can overflow if sector_t is 32-bit.  Fix with:

	sz = (loff_t)sec << 9;
I will fix and send it too.


J. R. Okajima
--
To unsubscribe from this list: send the line "unsubscribe linux-api" 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