From: syzbot <syzbot+4d2aaeff9eb5a2cfec70@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] possible fix (linux-ntfs3)
Date: Tue, 10 Sep 2024 00:08:00 -0700 [thread overview]
Message-ID: <000000000000aa39df0621be8870@google.com> (raw)
In-Reply-To: <000000000000acfa76061fcca330@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: possible fix (linux-ntfs3)
Author: almaz.alexandrovich@paragon-software.com
#syz test: https://github.com/Paragon-Software-Group/linux-ntfs3.git master
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 128d49512f5d..4a2062e481a4 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -124,10 +124,15 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...)
struct dentry *de = d_find_alias(inode);
if (de) {
+ int len;
spin_lock(&de->d_lock);
- snprintf(name, sizeof(s_name_buf), " \"%s\"",
- de->d_name.name);
+ len = snprintf(name, sizeof(s_name_buf), " \"%s\"",
+ de->d_name.name);
spin_unlock(&de->d_lock);
+ if (len <= 0)
+ name[0] = 0;
+ else if (len >= sizeof(s_name_buf))
+ name[sizeof(s_name_buf) - 1] = 0;
} else {
name[0] = 0;
}
next prev parent reply other threads:[~2024-09-10 7:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 13:07 [syzbot] [ntfs3?] kernel panic: stack is corrupted in vprintk_emit syzbot
2024-08-27 7:27 ` Edward Adam Davis
2024-08-27 7:50 ` syzbot
2024-09-02 12:27 ` [syzbot] possible fix (linux-ntfs3) syzbot
2024-09-02 12:44 ` [syzbot] possible fix 2 (linux-ntfs3) syzbot
2024-09-02 12:45 ` [syzbot] possible fix 2 (upstream) syzbot
2024-09-04 14:18 ` [syzbot] check syzbot
2024-09-04 14:22 ` syzbot
2024-09-10 7:08 ` syzbot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-04 1:15 [syzbot] [ntfs3?] INFO: trying to register non-static key in mark_as_free_ex syzbot
2024-09-09 15:13 ` [syzbot] possible fix (linux-ntfs3) syzbot
2024-09-01 20:28 [syzbot] [ntfs3?] KMSAN: uninit-value in ntfs_read_bh syzbot
2024-09-10 7:14 ` [syzbot] possible fix (linux-ntfs3) syzbot
2024-07-13 6:10 [syzbot] [ntfs3?] general protection fault in run_is_mapped_full syzbot
2024-09-02 13:00 ` [syzbot] possible fix (linux-ntfs3) syzbot
2022-10-01 13:47 [syzbot] possible deadlock in mi_read syzbot
2024-09-02 13:17 ` [syzbot] possible fix (linux-ntfs3) 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=000000000000aa39df0621be8870@google.com \
--to=syzbot+4d2aaeff9eb5a2cfec70@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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