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: <BANLkTimB2UanZA4wf=uBGcj=wKmDhCco=w@mail.gmail.com>
Date:	Fri, 3 Jun 2011 21:26:21 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Timur Tabi <timur@...escale.com>
Cc:	alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org,
	scottwood@...escale.com, akpm@...ux-foundation.org
Subject: Re: [PATCH] lib: introduce strdup_from_user

On Fri, Jun 3, 2011 at 9:22 PM, Timur Tabi <timur@...escale.com> wrote:
> Alexey Dobriyan wrote:
>> NAK
>> It accesses userspace data twice.
>
> What's wrong with that?

If mm is shared, data can or will change under you.

> How else is it supposed to know how much to allocate
> without using strlen first?

I don't know.
What I know is that your function doesn't guarantee NUL-termination.

> Besides, it was Alan's idea to make this a common function.  I can easily put it
> back in my driver.

Don't do that.
--
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