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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd4cb8900911230836na261658udd82f5c20630ffba@mail.gmail.com>
Date:	Mon, 23 Nov 2009 17:36:20 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	eranian@...il.com, a.p.zijlstra@...llo.nl, mingo@...e.hu,
	paulus@...ba.org, perfmon2-devel@...ts.sourceforge.net
Subject: [PATCH] perf_events: fix bogus copy_to_user() in perf_event_read_group()

       When using an event group, the value and id for non leaders events were
       wrong due to invalid offset into the outgoing buffer.

       Signed-off-by: Stephane Eranian <eranian@...gle.com>

---
 perf_event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 0b0d5f7..8306127 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1826,7 +1826,7 @@ static int perf_event_read_group(struct perf_event *event,

               size = n * sizeof(u64);

-               if (copy_to_user(buf + size, values, size)) {
+               if (copy_to_user(buf + ret, values, size)) {
                       ret = -EFAULT;
                       goto unlock;
               }
--
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