Linux block layer
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Dominik Maier <dmnk@google.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, dmnk+artist@google.com
Subject: Re: [PATCH] loop: check for read-write open mode on LOOP_SET_STATUS in lo_compat_ioctl()
Date: Thu, 22 Oct 2026 16:36:58 -0700	[thread overview]
Message-ID: <06d396ff-03bb-4bd0-800d-b09eead0ca62@acm.org> (raw)
In-Reply-To: <20261022232114.2535802-1-dmnk@google.com>

On 10/22/26 4:21 PM, Dominik Maier wrote:
 > In 64-bit lo_ioctl(), commit 7035b5df3c07 ("loop: cleanup set_status
 > interface") added a check requiring (mode & FMODE_WRITE) ||
 > capable(CAP_SYS_ADMIN) (now BLK_OPEN_WRITE) before allowing
 > LOOP_SET_STATUS or LOOP_SET_STATUS64, but the corresponding check was
 > omitted from 32-bit lo_compat_ioctl().

In the Linux kernel compat ioctl handlers allow 32-bit user-space 
applications to use ioctl() interfaces when running on a 64-bit kernel. 
They provide compatibility between the data layouts and calling 
conventions of 32-bit applications and the 64-bit kernel.
Hence, the above description is not correct. Please consider
rephrasing this as "lo_ioctl() ... but not lo_compat_ioctl(), the
handler used by 32-bit user space on 64-bit kernels".

 > Fixes: 7035b5df3c07 ("loop: cleanup set_status interface")

Commit 7035b5df3c07 is not the commit that introduced the bug fixed by
this patch. Since this bug may be as old as the loop driver, please
remove the Fixes: tag and add a Cc: stable@vger.kernel.org tag.

Thanks,

Bart.

      reply	other threads:[~2026-10-22 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 23:21 [PATCH] loop: check for read-write open mode on LOOP_SET_STATUS in lo_compat_ioctl() Dominik Maier
2026-10-22 23:36 ` Bart Van Assche [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=06d396ff-03bb-4bd0-800d-b09eead0ca62@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=dmnk+artist@google.com \
    --cc=dmnk@google.com \
    --cc=linux-block@vger.kernel.org \
    /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