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:	Thu, 22 Jan 2015 11:25:02 -0600
From:	Jeff Epler <jepler@...ythonic.net>
To:	Anshul Garg <aksgarg1989@...il.com>
Cc:	akpm@...ux-foundation.org, levex@...ux.com,
	felipe.contreras@...il.com, linux-kernel@...r.kernel.org,
	anshul.g@...sung.com
Subject: Re: [PATCH] lib/kstrtox.c clean kstrtoll function

On Thu, Jan 22, 2015 at 05:54:10AM -0800, Anshul Garg wrote:
> -		if ((long long)(-tmp) >= 0)
> -			return -ERANGE;
> -		*res = -tmp;
...
> +	if ((long long)tmp < 0)
> +		return -ERANGE;
> +	*res = sign * tmp;

I don't believe overflow handling is correct anymore with this patch.
Did you try with the input as the most negative possible unsigned long?

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