James Pearson wrote:
> Arvin Moezzi wrote:
>
>> I think that's not true. 'count' is changing through the iteration.
>> The difference in the mem_read():
>>
>> * while (count > 0) {
>> * int this_len, retval;
>> *
>> * this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count;
>> * retval =
James Pearson wrote:
Arvin Moezzi wrote:
I think that's not true. 'count' is changing through the iteration.
The difference in the mem_read():
* while (count 0) {
* int this_len, retval;
*
* this_len = (count PAGE_SIZE) ? PAGE_SIZE : count;
* retval =
Arvin Moezzi wrote:
I think that's not true. 'count' is changing through the iteration.
The difference in the mem_read():
* while (count > 0) {
* int this_len, retval;
*
* this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count;
* retval = access_process_vm(task, src, page, this_len,
> >>+
> >>+ if (copy_to_user(buf, page, retval)) {
> >
> >
> > shouldn't you only copy min(count,retval) bytes? otherwise you could
> > write beyond the users buffer "buf", right?
>
> AFAIK, 'retval' can never be
On (20/09/07 16:46), Andrew Morton didst pronounce:
> On Wed, 19 Sep 2007 14:35:29 +0100
> "James Pearson" <[EMAIL PROTECTED]> wrote:
>
> >
> > From: James Pearson <[EMAIL PROTECTED]>
> >
> > /proc/PID/environ currently truncates at 4096 characters, patch based on
> > the /proc/PID/mem code.
>
Arvin Moezzi wrote:
2007/9/19, James Pearson <[EMAIL PROTECTED]>:
+ while (count > 0) {
+ int this_len, retval;
+
+ this_len = mm->env_end - (mm->env_start + src);
+
+ if (this_len <= 0)
+ break;
+
+ if
Andrew Morton wrote:
On Wed, 19 Sep 2007 14:35:29 +0100
"James Pearson" <[EMAIL PROTECTED]> wrote:
From: James Pearson <[EMAIL PROTECTED]>
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
patch needs to be carefully reviewed from the
Arvin Moezzi wrote:
2007/9/19, James Pearson [EMAIL PROTECTED]:
+ while (count 0) {
+ int this_len, retval;
+
+ this_len = mm-env_end - (mm-env_start + src);
+
+ if (this_len = 0)
+ break;
+
+ if (this_len
Andrew Morton wrote:
On Wed, 19 Sep 2007 14:35:29 +0100
James Pearson [EMAIL PROTECTED] wrote:
From: James Pearson [EMAIL PROTECTED]
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
patch needs to be carefully reviewed from the security POV
On (20/09/07 16:46), Andrew Morton didst pronounce:
On Wed, 19 Sep 2007 14:35:29 +0100
James Pearson [EMAIL PROTECTED] wrote:
From: James Pearson [EMAIL PROTECTED]
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
patch needs to be
+
+ if (copy_to_user(buf, page, retval)) {
shouldn't you only copy min(count,retval) bytes? otherwise you could
write beyond the users buffer buf, right?
AFAIK, 'retval' can never be greater than
Arvin Moezzi wrote:
I think that's not true. 'count' is changing through the iteration.
The difference in the mem_read():
* while (count 0) {
* int this_len, retval;
*
* this_len = (count PAGE_SIZE) ? PAGE_SIZE : count;
* retval = access_process_vm(task, src, page, this_len,
2007/9/19, James Pearson <[EMAIL PROTECTED]>:
> + while (count > 0) {
> + int this_len, retval;
> +
> + this_len = mm->env_end - (mm->env_start + src);
> +
> + if (this_len <= 0)
> + break;
> +
> + if (this_len >
On Wed, 19 Sep 2007 14:35:29 +0100
"James Pearson" <[EMAIL PROTECTED]> wrote:
>
> From: James Pearson <[EMAIL PROTECTED]>
>
> /proc/PID/environ currently truncates at 4096 characters, patch based on
> the /proc/PID/mem code.
patch needs to be carefully reviewed from the security POV (ie:
On Wed, 19 Sep 2007 14:35:29 +0100
James Pearson [EMAIL PROTECTED] wrote:
From: James Pearson [EMAIL PROTECTED]
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
patch needs to be carefully reviewed from the security POV (ie: permissions)
as
2007/9/19, James Pearson [EMAIL PROTECTED]:
+ while (count 0) {
+ int this_len, retval;
+
+ this_len = mm-env_end - (mm-env_start + src);
+
+ if (this_len = 0)
+ break;
+
+ if (this_len max_len)
+
On Wed, 19 Sep 2007, Mikael Pettersson wrote:
> H. Peter Anvin writes:
> > Mikael Pettersson wrote:
> > > Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem >
> /dev/null'
> > > for a known good PID, the first read() from /proc/PID/mem fails with
> ESRCH,
> >
> > Of course it
H. Peter Anvin writes:
> Mikael Pettersson wrote:
> > On Wed, 19 Sep 2007 14:35:29 +0100, James Pearson wrote:
> >> /proc/PID/environ currently truncates at 4096 characters, patch based on
> >> the /proc/PID/mem code.
> >
> > Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem
Mikael Pettersson wrote:
> On Wed, 19 Sep 2007 14:35:29 +0100, James Pearson wrote:
>> /proc/PID/environ currently truncates at 4096 characters, patch based on
>> the /proc/PID/mem code.
>
> Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem > /dev/null'
> for a known good PID, the
On Wed, 19 Sep 2007 14:35:29 +0100, James Pearson wrote:
> /proc/PID/environ currently truncates at 4096 characters, patch based on
> the /proc/PID/mem code.
Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem > /dev/null'
for a known good PID, the first read() from /proc/PID/mem
From: James Pearson <[EMAIL PROTECTED]>
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
Signed-off-by: James Pearson <[EMAIL PROTECTED]>
---
Patch against 2.6.23-rc6-mm1
--- ./fs/proc/base.c.dist 2007-09-19 12:29:46.244929651 +0100
+++
From: James Pearson [EMAIL PROTECTED]
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
Signed-off-by: James Pearson [EMAIL PROTECTED]
---
Patch against 2.6.23-rc6-mm1
--- ./fs/proc/base.c.dist 2007-09-19 12:29:46.244929651 +0100
+++
On Wed, 19 Sep 2007 14:35:29 +0100, James Pearson wrote:
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem /dev/null'
for a known good PID, the first read() from /proc/PID/mem fails
Mikael Pettersson wrote:
On Wed, 19 Sep 2007 14:35:29 +0100, James Pearson wrote:
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem /dev/null'
for a known good PID, the first
H. Peter Anvin writes:
Mikael Pettersson wrote:
On Wed, 19 Sep 2007 14:35:29 +0100, James Pearson wrote:
/proc/PID/environ currently truncates at 4096 characters, patch based on
the /proc/PID/mem code.
Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem
On Wed, 19 Sep 2007, Mikael Pettersson wrote:
H. Peter Anvin writes:
Mikael Pettersson wrote:
Does /proc/PID/mem even work? If I do `strace cat /proc/PID/mem
/dev/null'
for a known good PID, the first read() from /proc/PID/mem fails with
ESRCH,
Of course it does. Address
26 matches
Mail list logo