[Lucid][CVE-2013-0160][PATCH v2 4/7] fanotify: FMODE_NONOTIFY and __O_SYNC in sparc conflict

Luis Henriques luis.henriques at canonical.com
Fri Jan 24 14:17:22 UTC 2014


From: "Signed-off-by: Wu Fengguang" <fengguang.wu at intel.com>

CVE-2013-0160

BugLink: http://bugs.launchpad.net/bugs/1097680

sparc used the same value as FMODE_NONOTIFY so change FMODE_NONOTIFY to be
something unique.

Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
Signed-off-by: Eric Paris <eparis at redhat.com>
(cherry picked from commit 12ed2e36c98aec6c41559222e311f4aa15d254b6)
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 include/asm-generic/fcntl.h | 2 +-
 include/linux/fs.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index c8ba134..aeef057 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -5,7 +5,7 @@
 
 /*
  * FMODE_EXEC is 0x20
- * FMODE_NONOTIFY is 0x800000
+ * FMODE_NONOTIFY is 0x1000000
  * These cannot be used by userspace O_* until internal and external open
  * flags are split.
  * -Eric Paris
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 42f714f..34cb8c5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -92,7 +92,7 @@ struct inodes_stat_t {
 #define FMODE_RANDOM		((__force fmode_t)4096)
 
 /* File was opened by fanotify and shouldn't generate fanotify events */
-#define FMODE_NONOTIFY		((__force fmode_t)8388608)
+#define FMODE_NONOTIFY		((__force fmode_t)16777216) /* 0x1000000 */
 
 /*
  * The below are the various read and write types that we support. Some of
-- 
1.8.3.2




More information about the kernel-team mailing list