]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Oct 2012 21:15:41 +0000 (14:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Oct 2012 21:15:41 +0000 (14:15 -0700)
added patches:
fs-prevent-use-after-free-in-auditing-when-symlink-following-was-denied.patch

queue-3.6/fs-prevent-use-after-free-in-auditing-when-symlink-following-was-denied.patch [new file with mode: 0644]
queue-3.6/series

diff --git a/queue-3.6/fs-prevent-use-after-free-in-auditing-when-symlink-following-was-denied.patch b/queue-3.6/fs-prevent-use-after-free-in-auditing-when-symlink-following-was-denied.patch
new file mode 100644 (file)
index 0000000..6162ad1
--- /dev/null
@@ -0,0 +1,35 @@
+From ffd8d101a3a7d3f2e79deee1e342801703b6dc70 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sasha.levin@oracle.com>
+Date: Thu, 4 Oct 2012 19:56:40 -0400
+Subject: fs: prevent use after free in auditing when symlink following was denied
+
+From: Sasha Levin <sasha.levin@oracle.com>
+
+commit ffd8d101a3a7d3f2e79deee1e342801703b6dc70 upstream.
+
+Commit "fs: add link restriction audit reporting" has added auditing of failed
+attempts to follow symlinks. Unfortunately, the auditing was being done after
+the struct path structure was released earlier.
+
+Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/namei.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -692,9 +692,9 @@ static inline int may_follow_link(struct
+       if (parent->i_uid == inode->i_uid)
+               return 0;
++      audit_log_link_denied("follow_link", link);
+       path_put_conditional(link, nd);
+       path_put(&nd->path);
+-      audit_log_link_denied("follow_link", link);
+       return -EACCES;
+ }
index f67f940f86fb4985fb23c55e473259e1dfbde948..351e073f083df44631ad45887a1ff788db5360d3 100644 (file)
@@ -53,3 +53,4 @@ mips-ath79-fix-cpu-ddr-frequency-calculation-for-srif-plls.patch
 kbuild-fix-accidental-revert-in-commit-fe04ddf.patch
 add-cdc-acm-support-for-the-cx93010-2x-ucmxx-usb-modem.patch
 fs-handle-failed-audit_log_start-properly.patch
+fs-prevent-use-after-free-in-auditing-when-symlink-following-was-denied.patch