On 09-08-2023 11:07, Luca Vizzarro wrote:
When working with PCuABI, user pointers carry metadata as they are capabilities. The kernel's copy_from_user function does not support them though, meaning that their metadata is not copied in the process.
nit: Their metadata is copied, their tag is not.
This commit changes the used function to copy_from_user_with_ptr which exists to solve this problem.
Signed-off-by: Luca Vizzarro Luca.Vizzarro@arm.com
drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 2eb493e2123e..6972829ec6b5 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1990,7 +1990,7 @@ static int proc_submiturb(struct usb_dev_state *ps, void __user *arg) struct usbdevfs_urb uurb; sigval_t userurb_sigval;
- if (copy_from_user(&uurb, arg, sizeof(uurb)))
- if (copy_from_user_with_ptr(&uurb, arg, sizeof(uurb))) return -EFAULT;
memset(&userurb_sigval, 0, sizeof(userurb_sigval));