]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Oct 2012 20:58:30 +0000 (13:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Oct 2012 20:58:30 +0000 (13:58 -0700)
added patches:
fs-handle-failed-audit_log_start-properly.patch

queue-3.6/fs-handle-failed-audit_log_start-properly.patch [new file with mode: 0644]
queue-3.6/series

diff --git a/queue-3.6/fs-handle-failed-audit_log_start-properly.patch b/queue-3.6/fs-handle-failed-audit_log_start-properly.patch
new file mode 100644 (file)
index 0000000..1bf1296
--- /dev/null
@@ -0,0 +1,34 @@
+From d1c7d97ad58836affde6e39980b96527510b572e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sasha.levin@oracle.com>
+Date: Thu, 4 Oct 2012 19:57:31 -0400
+Subject: fs: handle failed audit_log_start properly
+
+From: Sasha Levin <sasha.levin@oracle.com>
+
+commit d1c7d97ad58836affde6e39980b96527510b572e upstream.
+
+audit_log_start() may return NULL, this is unchecked by the caller in
+audit_log_link_denied() and could cause a NULL ptr deref.
+
+Introduced by commit a51d9eaa ("fs: add link restriction audit reporting").
+
+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>
+
+---
+ kernel/audit.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/kernel/audit.c
++++ b/kernel/audit.c
+@@ -1466,6 +1466,8 @@ void audit_log_link_denied(const char *o
+       ab = audit_log_start(current->audit_context, GFP_KERNEL,
+                            AUDIT_ANOM_LINK);
++      if (!ab)
++              return;
+       audit_log_format(ab, "op=%s action=denied", operation);
+       audit_log_format(ab, " pid=%d comm=", current->pid);
+       audit_log_untrustedstring(ab, current->comm);
index f263c6f376832de8bb6c1078016e3914675badb7..f67f940f86fb4985fb23c55e473259e1dfbde948 100644 (file)
@@ -52,3 +52,4 @@ pktgen-fix-crash-when-generating-ipv6-packets.patch
 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