public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Jan Kara <jack@suse.cz>,
	Raphael Pinsonneault-Thibeault <rpthibeault@gmail.com>
Cc: syzbot+3ee481e21fd75e14c397@syzkaller.appspotmail.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev,
	Yongpeng Yang <yangyongpeng@xiaomi.com>
Subject: Re: [PATCH v2] loop: don't change loop device under exclusive opener in loop_set_status
Date: Tue, 6 Jan 2026 05:31:19 -0700	[thread overview]
Message-ID: <9a687e88-7cf2-49ae-8b79-1b87a21c070f@kernel.dk> (raw)
In-Reply-To: <f45muigy6nwxtbfbxidbqyru73qtntuqfby6lgnt32c6eyyov6@eg2mbf6pncq6>

On 1/6/26 5:08 AM, Jan Kara wrote:
> On Wed 17-12-25 14:00:40, Raphael Pinsonneault-Thibeault wrote:
>> loop_set_status() is allowed to change the loop device while there
>> are other openers of the device, even exclusive ones.
>>
>> In this case, it causes a KASAN: slab-out-of-bounds Read in
>> ext4_search_dir(), since when looking for an entry in an inlined
>> directory, e_value_offs is changed underneath the filesystem by
>> loop_set_status().
>>
>> Fix the problem by forbidding loop_set_status() from modifying the loop
>> device while there are exclusive openers of the device. This is similar
>> to the fix in loop_configure() by commit 33ec3e53e7b1 ("loop: Don't
>> change loop device under exclusive opener") alongside commit ecbe6bc0003b
>> ("block: use bd_prepare_to_claim directly in the loop driver").
>>
>> Reported-by: syzbot+3ee481e21fd75e14c397@syzkaller.appspotmail.com
>> Closes: https://syzkaller.appspot.com/bug?extid=3ee481e21fd75e14c397
>> Tested-by: syzbot+3ee481e21fd75e14c397@syzkaller.appspotmail.com
>> Tested-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
>> Signed-off-by: Raphael Pinsonneault-Thibeault <rpthibeault@gmail.com>
>> Reviewed-by: Jan Kara <jack@suse.cz>
> 
> Jens, ping?

Now applied. Heads up in general, don't nest v2 or later inside the
original thread. It just makes emails get lost, as it appears part
of the original discussion.

-- 
Jens Axboe


  reply	other threads:[~2026-01-06 12:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 14:42 [PATCH] loop: don't change loop device under exclusive opener in loop_set_status Raphael Pinsonneault-Thibeault
2025-11-18  7:10 ` Yongpeng Yang
2025-12-01 12:38   ` Jan Kara
2025-12-02  9:03     ` Yongpeng Yang
2025-12-02 10:07 ` Jan Kara
2025-12-17 17:48   ` Jan Kara
2025-12-17 19:00     ` [PATCH v2] " Raphael Pinsonneault-Thibeault
2026-01-06 12:08       ` Jan Kara
2026-01-06 12:31         ` Jens Axboe [this message]
2026-01-06 12:30       ` Jens Axboe

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=9a687e88-7cf2-49ae-8b79-1b87a21c070f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpthibeault@gmail.com \
    --cc=syzbot+3ee481e21fd75e14c397@syzkaller.appspotmail.com \
    --cc=yangyongpeng@xiaomi.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