Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2018-10-15 10:56:30 -0500
committerGoldwyn Rodrigues <rgoldwyn@suse.com>2018-10-15 10:56:55 -0500
commit1a4e6167962153aeaaacdb7cf856755bd137f6a6 (patch)
tree5885ddcae50c6ff8181287b47cd1b1f5d6c70186
parent0bb629027bbcef55d1f6529a0d538ec238426fcf (diff)
ovl: fix format of setxattr debug (git-fixes).
-rw-r--r--patches.fixes/ovl-fix-format-of-setxattr-debug.patch34
-rw-r--r--series.conf1
2 files changed, 35 insertions, 0 deletions
diff --git a/patches.fixes/ovl-fix-format-of-setxattr-debug.patch b/patches.fixes/ovl-fix-format-of-setxattr-debug.patch
new file mode 100644
index 0000000000..a72cc9c48f
--- /dev/null
+++ b/patches.fixes/ovl-fix-format-of-setxattr-debug.patch
@@ -0,0 +1,34 @@
+From 1a8f8d2a443ef9ad9a3065ba8c8119df714240fa Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Thu Oct 4 14:49:10 2018 +0200
+Subject: [PATCH] ovl: fix format of setxattr debug
+Git-commit: 1a8f8d2a443ef9ad9a3065ba8c8119df714240fa
+References: git-fixes
+Patch-mainline: v4.19-rc7
+
+Format has a typo: it was meant to be "%.*s", not "%*s". But at some point
+callers grew nonprintable values as well, so use "%*pE" instead with a
+maximized length.
+
+Reported-by: Amir Goldstein <amir73il@gmail.com>
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Fixes: 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up")
+Cc: <stable@vger.kernel.org> # v4.12
+Acked-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
+
+diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
+index f61839e..a3c0d95 100644
+
+--- a/fs/overlayfs/overlayfs.h
++++ b/fs/overlayfs/overlayfs.h
+@@ -152,8 +152,8 @@ static inline int ovl_do_setxattr(struct dentry *dentry, const char *name,
+ const void *value, size_t size, int flags)
+ {
+ int err = vfs_setxattr(dentry, name, value, size, flags);
+- pr_debug("setxattr(%pd2, \"%s\", \"%*s\", 0x%x) = %i\n",
+- dentry, name, (int) size, (char *) value, flags, err);
++ pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0x%x) = %i\n",
++ dentry, name, min((int)size, 48), value, size, flags, err);
+ return err;
+ }
+
diff --git a/series.conf b/series.conf
index df7925a1a4..3c7d570a8b 100644
--- a/series.conf
+++ b/series.conf
@@ -17837,6 +17837,7 @@
patches.suse/ipv4-fix-use-after-free-in-ip_cmsg_recv_dstaddr.patch
patches.drivers/0001-drm-i915-Handle-incomplete-Z_FINISH-for-compressed-e.patch
patches.arch/ARM-8799-1-mm-fix-pci_ioremap_io-offset-check.patch
+ patches.fixes/ovl-fix-format-of-setxattr-debug.patch
patches.fixes/crypto-caam-jr-fix-ablkcipher_edesc-pointer-arithmet.patch
patches.drivers/crypto-mxs-dcp-Fix-wait-logic-on-chan-threads.patch
patches.drivers/crypto-qat-Fix-KASAN-stack-out-of-bounds-bug-in-adf_.patch