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-next>] [day] [month] [year] [list]
Message-ID: <8681248a-da16-5448-31fe-26df9e7cfc25@virtuozzo.com>
Date:   Fri, 24 Jan 2020 10:02:51 +0300
From:   Vasily Averin <vvs@...tuozzo.com>
To:     linux-kernel@...r.kernel.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        NeilBrown <neilb@...e.com>, Waiman Long <longman@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Oberparleiter <oberpar@...ux.ibm.com>
Subject: [PATCH 3/7] t_next should increase position index

if seq_file .next fuction does not change position index,
read after some lseek can generate unexpected output.

https://bugzilla.kernel.org/show_bug.cgi?id=206283
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
 kernel/trace/ftrace.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 9bf1f2c..ca25210 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3442,8 +3442,10 @@ static void *t_mod_start(struct seq_file *m, loff_t *pos)
 	loff_t l = *pos; /* t_probe_start() must use original pos */
 	void *ret;
 
-	if (unlikely(ftrace_disabled))
+	if (unlikely(ftrace_disabled)) {
+		(*pos)++;
 		return NULL;
+	}
 
 	if (iter->flags & FTRACE_ITER_PROBE)
 		return t_probe_next(m, pos);
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ