linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mateusz Guzik <mjguzik@gmail.com>
To: syzbot <syzbot+48a99e426f29859818c0@syzkaller.appspotmail.com>
Cc: akpm@linux-foundation.org, brauner@kernel.org,
	gustavoars@kernel.org,  kees@kernel.org,
	linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-mm@kvack.org, syzkaller-bugs@googlegroups.com,
	tytso@mit.edu
Subject: Re: [syzbot] [hardening?] [mm?] BUG: bad usercopy in vfs_readlink
Date: Wed, 5 Feb 2025 13:26:18 +0100	[thread overview]
Message-ID: <zv5u3q3m7t5yehblaqnrcz2k73yozpx7nn5mvbkedrzw2jaowf@soiirioxlfbz> (raw)
In-Reply-To: <67a1e1f4.050a0220.163cdc.0063.GAE@google.com>

On Tue, Feb 04, 2025 at 01:46:28AM -0800, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    69b8923f5003 Merge tag 'for-linus-6.14-ofs4' of git://git...
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=1258aeb0580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=57ab43c279fa614d
> dashboard link: https://syzkaller.appspot.com/bug?extid=48a99e426f29859818c0
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15825724580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1658aeb0580000
> 

#syz test  upstream  master

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 7c54ae5fcbd4..30cff983e601 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5010,7 +5010,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
 			nd_terminate_link(ei->i_data, inode->i_size,
 				sizeof(ei->i_data) - 1);
 			inode_set_cached_link(inode, (char *)ei->i_data,
-					      inode->i_size);
+					      strlen((char *)ei->i_data));
 		} else {
 			inode->i_op = &ext4_symlink_inode_operations;
 		}


  parent reply	other threads:[~2025-02-05 12:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  9:46 syzbot
2025-02-04 11:38 ` Mateusz Guzik
2025-02-04 15:30   ` Kees Cook
2025-02-04 15:58     ` Mateusz Guzik
2025-02-04 16:49       ` Mateusz Guzik
2025-02-04 20:30         ` Theodore Ts'o
2025-02-04 20:48           ` Mateusz Guzik
2025-02-04 21:25             ` Mateusz Guzik
2025-02-05  5:26               ` Theodore Ts'o
2025-02-05 12:18                 ` Mateusz Guzik
2025-02-05 12:26 ` Mateusz Guzik [this message]
2025-02-05 15:20   ` syzbot
2025-02-05 18:21 ` Jan Kara
2025-02-05 18:39   ` Kees Cook
2025-02-06  9:43     ` Jan Kara
2025-02-05 18:53   ` 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=zv5u3q3m7t5yehblaqnrcz2k73yozpx7nn5mvbkedrzw2jaowf@soiirioxlfbz \
    --to=mjguzik@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=syzbot+48a99e426f29859818c0@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tytso@mit.edu \
    /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