[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120110131446.GA30465@redhat.com>
Date: Tue, 10 Jan 2012 14:14:46 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Christopher Yeoh <cyeoh@....ibm.com>
Cc: linux-kernel@...r.kernel.org, Chris Yeoh <yeohc@....ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Howells <dhowells@...hat.com>
Subject: Re: 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists