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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-878b5a6efd38030c7a90895dc8346e8fb1e09b4c@git.kernel.org>
Date:	Thu, 12 Sep 2013 04:11:37 -0700
From:	tip-bot for Oleg Nesterov <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	hkshaw@...ux.vnet.ibm.com, anton@...hat.com, tglx@...utronix.de,
	oleg@...hat.com, Mikhail.Kulemin@...ibm.com
Subject: [tip:perf/urgent] uprobes: Fix utask->
 depth accounting in handle_trampoline()

Commit-ID:  878b5a6efd38030c7a90895dc8346e8fb1e09b4c
Gitweb:     http://git.kernel.org/tip/878b5a6efd38030c7a90895dc8346e8fb1e09b4c
Author:     Oleg Nesterov <oleg@...hat.com>
AuthorDate: Wed, 11 Sep 2013 17:47:26 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 12 Sep 2013 08:00:55 +0200

uprobes: Fix utask->depth accounting in handle_trampoline()

Currently utask->depth is simply the number of allocated/pending
return_instance's in uprobe_task->return_instances list.

handle_trampoline() should decrement this counter every time we
handle/free an instance, but due to typo it does this only if
->chained == T. This means that in the likely case this counter
is never decremented and the probed task can't report more than
MAX_URETPROBE_DEPTH events.

Reported-by: Mikhail Kulemin <Mikhail.Kulemin@...ibm.com>
Reported-by: Hemant Kumar Shaw <hkshaw@...ux.vnet.ibm.com>
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Acked-by: Anton Arapov <anton@...hat.com>
Cc: masami.hiramatsu.pt@...achi.com
Cc: srikar@...ux.vnet.ibm.com
Cc: systemtap@...rceware.org
Cc: stable@...r.kernel.org
Link: http://lkml.kernel.org/r/20130911154726.GA8093@redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/events/uprobes.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index f356974..ad8e1bd 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1682,12 +1682,10 @@ static bool handle_trampoline(struct pt_regs *regs)
 		tmp = ri;
 		ri = ri->next;
 		kfree(tmp);
+		utask->depth--;
 
 		if (!chained)
 			break;
-
-		utask->depth--;
-
 		BUG_ON(!ri);
 	}
 
--
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