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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Feb 2017 19:37:53 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH] tracing: Have traceprobe_probes_write() not access
 userspace unnecessarily

On Fri, 10 Feb 2017 08:53:02 +0100
Ingo Molnar <mingo@...nel.org> wrote:

> 
> * Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > On Thu, 9 Feb 2017 18:04:58 -0500
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> > 
> > > 
> > > The code in traceprobe_probes_write() reads up to 4096 bytes from userpace
> > > for each line. If userspace passes in several lines to execute, the code
> > > will do a large read for each line, even though, it is highly likely that
> > > the first read from userspace received all of the lines at one.
> > > 
> > > I changed the logic to do a single read from userspace, and to only read
> > > from userspace again if not all of the read from userspace made it in.
> > > 
> > > I tested this by adding printk()s and writing files that would test -1, ==,
> > > and +1 the buffer size, to make sure that there's no overflows and that if a
> > > single line is written with +1 the buffer size, that it fails properly.
> > > 
> > 
> > Thanks Steve!
> > 
> > Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
> > 
> > BTW, this can conflict with my previous patch.
> > 
> > https://lkml.org/lkml/2017/2/6/1048
> > https://lkml.org/lkml/2017/2/7/203
> > 
> > I'll update this. Ingo, Can I send these patch to Steve?
> 
> Sure, I've not applied your patch yet - mind sending it to Steve on top of Steve's 
> patch?

Of course, yes. :)

Thanks!

> 
> Thanks,
> 
> 	Ingo


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ