From: Pavel Skripkin <paskripkin@gmail.com>
To: syzbot <syzbot+3c765c5248797356edaa@syzkaller.appspotmail.com>,
anton@tuxera.com, linux-kernel@vger.kernel.org,
linux-ntfs-dev@lists.sourceforge.net,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] kernel BUG in ntfs_read_inode_mount
Date: Mon, 17 Jan 2022 22:03:14 +0300 [thread overview]
Message-ID: <860dfdad-d7db-9c27-adfe-02a3b2e02d0b@gmail.com> (raw)
In-Reply-To: <38455f10-6cac-4eda-3e7a-3744fb377870@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]
On 1/17/22 22:02, Pavel Skripkin wrote:
> On 1/17/22 13:09, syzbot wrote:
>> Hello,
>>
>> syzbot found the following issue on:
>>
>> HEAD commit: d0a231f01e5b Merge tag 'pci-v5.17-changes' of git://git.ke..
>> git tree: upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=11f83837b00000
>> kernel config: https://syzkaller.appspot.com/x/.config?x=986ed422f1741853
>> dashboard link: https://syzkaller.appspot.com/bug?extid=3c765c5248797356edaa
>> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
>>
>> Unfortunately, I don't have any reproducer for this issue yet.
>>
>
> Sad :(
>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+3c765c5248797356edaa@syzkaller.appspotmail.com
>>
>
> __ntfs_malloc() calls BUG_ON() in case of requested size is equal to
> zero. Seems like syzbot has once again crafted malicious fs image that
> has attr_list_size == 0
>
> Just for thoughts
>
>
Clicked 'Send' button too early, sorry
With regards,
Pavel Skripkin
[-- Attachment #2: ph --]
[-- Type: text/plain, Size: 500 bytes --]
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index f5c058b3192c..a93fc3dbd4fd 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -1881,6 +1881,9 @@ int ntfs_read_inode_mount(struct inode *vi)
}
/* Now allocate memory for the attribute list. */
ni->attr_list_size = (u32)ntfs_attr_size(a);
+ if (ni->attr_list_size == 0)
+ goto put_err_out;
+
ni->attr_list = ntfs_malloc_nofs(ni->attr_list_size);
if (!ni->attr_list) {
ntfs_error(sb, "Not enough memory to allocate buffer "
prev parent reply other threads:[~2022-01-17 19:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 10:09 syzbot
2022-01-17 19:02 ` Pavel Skripkin
2022-01-17 19:03 ` Pavel Skripkin [this message]
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=860dfdad-d7db-9c27-adfe-02a3b2e02d0b@gmail.com \
--to=paskripkin@gmail.com \
--cc=anton@tuxera.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.net \
--cc=syzbot+3c765c5248797356edaa@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®