diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2013-12-15 10:36:34 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-12-15 10:36:34 -0500 |
commit | f5b8190c556b8bfda03ff4a34702dba5fb07b204 (patch) | |
tree | ab55f41e9790e4b6b31c2bea941b84fdb7ead025 /3.12.5/4427_force_XATTR_PAX_tmpfs.patch | |
parent | Grsec/PaX: 3.0-{2.6.32,3.2.53,3.12.4}-20131208 (diff) | |
download | hardened-patchset-f5b8190c556b8bfda03ff4a34702dba5fb07b204.tar.gz hardened-patchset-f5b8190c556b8bfda03ff4a34702dba5fb07b204.tar.bz2 hardened-patchset-f5b8190c556b8bfda03ff4a34702dba5fb07b204.zip |
Grsec/PaX: 3.0-{3.2.53,3.12.5}-20131213220420131213
Diffstat (limited to '3.12.5/4427_force_XATTR_PAX_tmpfs.patch')
-rw-r--r-- | 3.12.5/4427_force_XATTR_PAX_tmpfs.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/3.12.5/4427_force_XATTR_PAX_tmpfs.patch b/3.12.5/4427_force_XATTR_PAX_tmpfs.patch new file mode 100644 index 0000000..23e60cd --- /dev/null +++ b/3.12.5/4427_force_XATTR_PAX_tmpfs.patch @@ -0,0 +1,35 @@ +From: Anthony G. Basile <blueness@gentoo.org> + +For users that emerge without XATTR_PAX support enabled, we still want user.pax.flags +namespace supported on tmpfs so that the PaX markings survive emerge. + +diff -Naur a/mm/shmem.c b/mm/shmem.c +--- a/mm/shmem.c 2013-06-11 21:00:18.000000000 -0400 ++++ b/mm/shmem.c 2013-06-11 21:08:18.000000000 -0400 +@@ -2232,11 +2232,7 @@ + static int shmem_xattr_validate(const char *name) + { + struct { const char *prefix; size_t len; } arr[] = { +- +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS + { XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN}, +-#endif +- + { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN }, + { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN } + }; +@@ -2292,14 +2288,12 @@ + if (err) + return err; + +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS + if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { + if (strcmp(name, XATTR_NAME_PAX_FLAGS)) + return -EOPNOTSUPP; + if (size > 8) + return -EINVAL; + } +-#endif + + return simple_xattr_set(&info->xattrs, name, value, size, flags); + } |