public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+4d2aaeff9eb5a2cfec70@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] possible fix 2 (upstream)
Date: Mon, 02 Sep 2024 05:45:53 -0700	[thread overview]
Message-ID: <0000000000004d698e0621225251@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 2 (upstream)
Author: almaz.alexandrovich@paragon-software.com

#syz test: upstream master

diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 128d49512f5d..c08bbacc0030 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -125,8 +125,9 @@ void ntfs_inode_printk(struct inode *inode, const char *fmt, ...)
 
 		if (de) {
 			spin_lock(&de->d_lock);
-			snprintf(name, sizeof(s_name_buf), " \"%s\"",
-				 de->d_name.name);
+			if (snprintf(name, sizeof(s_name_buf), " \"%s\"",
+				     de->d_name.name) >= sizeof(s_name_buf))
+				name[sizeof(s_name_buf) - 1] = 0;
 			spin_unlock(&de->d_lock);
 		} else {
 			name[0] = 0;

  parent reply	other threads:[~2024-09-02 12:45 UTC|newest]

Thread overview: 9+ 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 [this message]
2024-09-04 14:18 ` [syzbot] check syzbot
2024-09-04 14:22 ` syzbot
2024-09-10  7:08 ` [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=0000000000004d698e0621225251@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