lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <18102.50001.544251.640632@gargle.gargle.HOWL>
Date:	Mon, 6 Aug 2007 01:44:33 -0500
From:	boutcher@...umn.edu (Dave Boutcher)
To:	Matt Mackall <mpm@...enic.com>
CC:	linux-kernel@...r.kernel.org, Dave Hansen <haveblue@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 2/3] Fix /proc/pid/pagemap header copy to userspace

Earlier code relied on a broken length calculation copy
/proc/pid/pagemap header data to userspace.  This fix
correctly calls the add_to_pagemap routine after the header data is
set to copy results to userspace in a sane fashion.

Signed-off-by: Dave Boutcher <boutcher@...umn.edu>
---
 fs/proc/task_mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index b2baeab..1f78cb4 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -657,11 +657,11 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
 	pm.out = buf;
 
 	if (svpfn == -1) {
-		add_to_pagemap(pm.next, 0, &pm);
 		((char *)page)[0] = (ntohl(1) != 1);
 		((char *)page)[1] = PAGE_SHIFT;
 		((char *)page)[2] = sizeof(unsigned long);
 		((char *)page)[3] = sizeof(unsigned long);
+		add_to_pagemap(pm.next, page[0], &pm);
 	}
 
 	down_read(&mm->mmap_sem);
-- 
1.4.4.2

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ