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-next>] [day] [month] [year] [list]
Message-Id: <200808071124.06160.swen@vnet.ibm.com>
Date:	Thu, 7 Aug 2008 11:24:05 +0200
From:	Swen Schillig <swen@...t.ibm.com>
To:	linux-kernel@...r.kernel.org
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Yi Yang <yi.y.yang@...el.com>
Subject: [PATCH] lib/vsprintf.c: wrong conversion function used

From: Swen Schillig <swen@...t.ibm.com>

The macro define_strict_strtoux() is using the simple_strtoul ()
function as opposed to the simple_strtoull() function.
This leads to false conversions on non-64bit 
machines (here 31bit System z).

The following patch fixes the issue introduced by 

commit 06b2a76d25d3cfbd14680021c1d356c91be6904e 
Author: Yi Yang <yi.y.yang@...el.com> 
Date:   Fri Feb 8 04:21:57 2008 -0800 

Signed-off-by: Swen Schillig <swen@...t.ibm.com>
---
 lib/vsprintf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: HEAD/lib/vsprintf.c
===================================================================
--- HEAD.orig/lib/vsprintf.c
+++ HEAD/lib/vsprintf.c
@@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, 
 	if (len == 0)							\
 		return -EINVAL;						\
 									\
-	val = simple_strtoul(cp, &tail, base);				\
+	val = simple_strtoull(cp, &tail, base);				\
 	if ((*tail == '\0') ||						\
 		((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\
 		*res = val;						\
--
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