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]
Date:	Sat, 21 Apr 2012 09:49:49 +0400
From:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
To:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Alexander Viro <viro@...iv.linux.org.uk>
Subject: [PATCH] fs: fix integer overflow in MS_NOUSER definition

MS_NOUSER defined as signed int (1<<31), sb->s_flags declared as unsigned long.
So (sb->s_flags & MS_NOUSER) works as (sb->s_flags & 0xffffffff80000000).

Other potential bugs: git grep -w -e '1\s*<<\s*31'

Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>
---
 include/linux/fs.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6b71bd6..903bf00 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -217,7 +217,7 @@ struct inodes_stat_t {
 #define MS_NOSEC	(1<<28)
 #define MS_BORN		(1<<29)
 #define MS_ACTIVE	(1<<30)
-#define MS_NOUSER	(1<<31)
+#define MS_NOUSER	(1u<<31)
 
 /*
  * Superblock flags that can be altered by MS_REMOUNT

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