From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+4125590f2a9f5b3cdf43@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [overlayfs?] WARNING in ovl_listxattr
Date: Thu, 12 Jun 2025 19:32:58 +0800 [thread overview]
Message-ID: <tencent_0FCF9E0D8025B30DEE122EDD8FDDA9996B07@qq.com> (raw)
In-Reply-To: <6828591c.a00a0220.398d88.0248.GAE@google.com>
#syz test
diff --git a/fs/xattr.c b/fs/xattr.c
index 8ec5b0204bfd..1f55b98ae275 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -491,6 +491,7 @@ vfs_listxattr(struct dentry *dentry, char *list, size_t size)
if (inode->i_op->listxattr) {
error = inode->i_op->listxattr(dentry, list, size);
+ printk("buf: %s, size: %lu, res: %ld, sb: %s, %s\n", list, size, error, inode->i_sb->s_type->name, __func__);
} else {
error = security_inode_listsecurity(inode, list, size);
if (size && error > size)
@@ -1466,12 +1467,14 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
int err = 0;
err = posix_acl_listxattr(inode, &buffer, &remaining_size);
+ printk("inode: %p, buf: %s, size: %lu, res: %d, %s\n", inode, buffer, size, err, __func__);
if (err)
- return err;
+ goto out;
err = security_inode_listsecurity(inode, buffer, remaining_size);
+ printk("2inode: %p, buf: %s, size: %lu, res: %d, %s\n", inode, buffer, size, err, __func__);
if (err < 0)
- return err;
+ goto out;
if (buffer) {
if (remaining_size < err)
@@ -1498,7 +1501,12 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
}
read_unlock(&xattrs->lock);
- return err ? err : size - remaining_size;
+ printk("3inode: %p, buf: %s, size: %lu, res: %d, remaining_size: %ld, %s\n", inode, buffer, size, err, remaining_size, __func__);
+ err = err ? err : size - remaining_size;
+ if (err > 0 && err < 24)
+ err = -ERANGE;
+out:
+ return err;
}
/**
next prev parent reply other threads:[~2025-06-12 11:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-17 9:38 syzbot
2025-06-12 7:14 ` [syzbot] " syzbot
2025-06-12 11:32 ` Edward Adam Davis [this message]
2025-06-12 13:19 ` syzbot
2025-06-12 13:34 ` Edward Adam Davis
2025-06-12 14:02 ` syzbot
2025-06-12 14:29 ` Edward Adam Davis
2025-06-12 14:59 ` syzbot
2025-06-12 15:01 ` [PATCH] fs/xattr: reset err to 0 after get security.* xattrs Edward Adam Davis
2025-06-12 15:09 ` Stephen Smalley
2025-07-17 7:47 ` [syzbot] [overlayfs?] WARNING in ovl_listxattr syzbot
[not found] <20250612071417.2222649-1-lizhi.xu@windriver.com>
2025-06-12 7:37 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_0FCF9E0D8025B30DEE122EDD8FDDA9996B07@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+4125590f2a9f5b3cdf43@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®