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]
Date:	Sat, 17 Oct 2015 13:33:48 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"David S. Miller" <davem@...emloft.net>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH] mm/maccess.c: actually return -EFAULT from
 strncpy_from_unsafe

On 10/17/15 1:20 PM, Rasmus Villemoes wrote:
> As far as I can tell, strncpy_from_unsafe never returns -EFAULT. ret
> is the result of a __copy_from_user_inatomic(), which is 0 for success
> and positive (in this case necessarily 1) for access error - it is
> never negative. So we were always returning the length of the,
> possibly truncated, destination string.
>
> Signed-off-by: Rasmus Villemoes<linux@...musvillemoes.dk>
> ---
> Probably not -stable-worthy. I can only find two callers, one of which
> ignores the return value.

good catch.
Acked-by: Alexei Starovoitov <ast@...nel.org>

cc-ing original authors where I copy pasted that part from.

--
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