lkml.org 
[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cross memory attach && security check
On 01/09, Oleg Nesterov wrote:
>
> Partly I was confused because (I guess) there is another minor bug in
> process_vm_rw(), I think we need
>
> --- x/mm/process_vm_access.c
> +++ x/mm/process_vm_access.c
> @@ -375,10 +375,10 @@ static ssize_t process_vm_rw(pid_t pid,
>
> /* Check iovecs */
> if (vm_write)
> - rc = rw_copy_check_uvector(WRITE, lvec, liovcnt, UIO_FASTIOV,
> + rc = rw_copy_check_uvector(READ, lvec, liovcnt, UIO_FASTIOV,
> iovstack_l, &iov_l, 1);
> else
> - rc = rw_copy_check_uvector(READ, lvec, liovcnt, UIO_FASTIOV,
> + rc = rw_copy_check_uvector(WRITE, lvec, liovcnt, UIO_FASTIOV,
> iovstack_l, &iov_l, 1);

Argh. No, I was wrong, vrfy_dir() swaps READ/WRITE.

Oleg.



\
 
 \ /
  Last update: 2012-01-10 14:23    [W:0.091 / U:0.020 seconds]
©2003-2014 Jasper Spaans. Advertise on this site