lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 12 Dec 2021 21:57:01 +0100
From:   Richard Weinberger <richard@....at>
To:     linux-nfs@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, anna.schumaker@...app.com,
        trond.myklebust@...merspace.com, david@...ma-star.at,
        Richard Weinberger <richard@....at>
Subject: [PATCH] NFS: nfs_encode_fh: Improve debug logging

When nfs_encode_fh() refuses to create fhandle due to
S_AUTOMOUNT, print the right log message.

Signed-off-by: Richard Weinberger <richard@....at>
---
 fs/nfs/export.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/export.c b/fs/nfs/export.c
index 171c424cb6d5..5f6e1b715545 100644
--- a/fs/nfs/export.c
+++ b/fs/nfs/export.c
@@ -42,7 +42,12 @@ nfs_encode_fh(struct inode *inode, __u32 *p, int *max_len, struct inode *parent)
 	dprintk("%s: max fh len %d inode %p parent %p",
 		__func__, *max_len, inode, parent);
 
-	if (*max_len < len || IS_AUTOMOUNT(inode)) {
+	if (IS_AUTOMOUNT(inode)) {
+		dprintk("%s: refusing to create fh for automount inode %p\n",
+			__func__, inode);
+		return FILEID_INVALID;
+	}
+	if (*max_len < len) {
 		dprintk("%s: fh len %d too small, required %d\n",
 			__func__, *max_len, len);
 		*max_len = len;
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ