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>] [day] [month] [year] [list]
Date:	Thu, 3 Mar 2016 13:00:38 -0500
From:	David Kershner <david.kershner@...sys.com>
To:	<gregkh@...uxfoundation.org>, <sparmaintainer@...sys.com>,
	<devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>
CC:	David Kershner <david.kershner@...sys.com>
Subject: [PATCH] staging: unisys: visorbus: variable adjustment should be a u64

This patch fixes the smatch error:

drivers/staging/unisys/visorbus/visorchipset.c:2217 visorchipset_ioctl()
warn: user controlled 'adjustment' cast to postive rl = 's64min-s64max'

This is because we read a s64 and pass it to a function as u64.

Signed-off-by: David Kershner <david.kershner@...sys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 5515845..5fbda7b 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -2248,7 +2248,7 @@ static inline int issue_vmcall_update_physical_time(u64 adjustment)
 static long visorchipset_ioctl(struct file *file, unsigned int cmd,
 			       unsigned long arg)
 {
-	s64 adjustment;
+	u64 adjustment;
 	s64 vrtc_offset;
 
 	switch (cmd) {
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ