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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJwJo6ZQ7cMrWfVJ_dJsXmtDohMq6FwSC60Qy9WZX8MNVrUpzA@mail.gmail.com>
Date:   Wed, 7 Feb 2018 14:35:00 +0000
From:   Dmitry Safonov <0x7f454c46@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     open list <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Masami Hiramatsu <mhiramat@...nel.org>, stable@...r.kernel.org
Subject: Re: [RFC][PATCH 1/6] ftrace: Remove incorrect setting of glob search field

2018-02-06 22:43 GMT+00:00 Steven Rostedt <rostedt@...dmis.org>:
> From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
>
> __unregister_ftrace_function_probe() will incorrectly parse the glob filter
> because it resets the search variable that was setup by filter_parse_regex().
>
> Al Viro reported this:
>
>     After that call of filter_parse_regex() we could have func_g.search not
>     equal to glob only if glob started with '!' or '*'.  In the former case
>     we would've buggered off with -EINVAL (not = 1).  In the latter we
>     would've set func_g.search equal to glob + 1, calculated the length of
>     that thing in func_g.len and proceeded to reset func_g.search back to
>     glob.
>
>     Suppose the glob is e.g. *foo*.  We end up with
>             func_g.type = MATCH_MIDDLE_ONLY;
>             func_g.len = 3;
>             func_g.search = "*foo";
>     Feeding that to ftrace_match_record() will not do anything sane - we
>     will be looking for names containing "*foo" (->len is ignored for that
>     one).
>
> Link: http://lkml.kernel.org/r/20180127031706.GE13338@ZenIV.linux.org.uk
>
> Cc: stable@...r.kernel.org
> Cc: Dmitry Safonov <0x7f454c46@...il.com>
> Fixes: 3ba009297149f ("ftrace: Introduce ftrace_glob structure")
> Reported-by: Al Viro <viro@...IV.linux.org.uk>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>

Reviewed-by: Dmitry Safonov <0x7f454c46@...il.com>
Thank you, Steven.

-- 
             Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ