From: "Darrick J. Wong" <djwong@kernel.org>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>,
Cengiz Can <cengiz.can@canonical.com>,
Attila Szasz <szasza.contact@gmail.com>,
Greg KH <gregkh@linuxfoundation.org>,
Salvatore Bonaccorso <carnil@debian.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-patches@linuxtesting.org, dutyrok@altlinux.org,
syzbot+5f3a973ed3dfb85a6683@syzkaller.appspotmail.com,
stable@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] hfs/hfsplus: fix slab-out-of-bounds in hfs_bnode_read_key
Date: Tue, 8 Apr 2025 07:50:53 -0700 [thread overview]
Message-ID: <20250408145053.GJ6266@frogsfrogsfrogs> (raw)
In-Reply-To: <CAFLxGvxH=4rHWu-44LSuWaGA_OB0FU0Eq4fedVTj3tf2D3NgYQ@mail.gmail.com>
On Tue, Apr 08, 2025 at 12:11:36PM +0200, Richard Weinberger wrote:
> On Mon, Apr 7, 2025 at 9:08 PM Darrick J. Wong <djwong@kernel.org> wrote:
> > It's also the default policy on Debian 12 and RHEL9 that if you're
> > logged into the GUI, any program can run:
> >
> > $ truncate -s 3g /tmp/a
> > $ mkfs.hfs /tmp/a
> > $ <write evil stuff on /tmp/a>
> > $ udisksctl loop-setup -f /tmp/a
> > $ udisksctl mount -b /dev/loopX
> >
> > and the user never sees a prompt. GNOME and KDE both display a
> > notification when the mount finishes, but by then it could be too late.
> > Someone should file a CVE against them too.
>
> At least on SUSE orphaned and other problematic filesystem kernel modules
> are blacklisted. I wonder why other distros didn't follow this approach.
Maximal flexibility, I'm assuming. It's at least somewhat comforting
that RHEL doesn't enable HFS in Kconfig so it's a nonissue for them, but
some day it's going to be ext4/XFS/btrfs that creates a compromise
widget.
> > You can tighten this up by doing this:
> >
> > # cat > /usr/share/polkit-1/rules.d/always-ask-mount.rules << ENDL
> > // don't allow mounting, reformatting, or loopdev creation without asking
> > polkit.addRule(function(action, subject) {
> > if ((action.id == "org.freedesktop.udisks2.loop-setup" ||
> > action.id == "org.freedesktop.udisks2.filesystem-mount" ||
> > action.id == "org.freedesktop.udisks2.modify-device") &&
> > subject.local == true) {
> > return polkit.Result.AUTH_ADMIN_KEEP;
> > }
> > });
> > ENDL
>
> Thanks for sharing this!
>
> > so at least you have to authenticate with an admin account. We do love
> > our footguns, don't we? At least it doesn't let you do that if you're
> > ssh'd in...
>
> IMHO guestmount and other userspace filesystem implementations should
> be the default
> for such mounts.
Agree. I don't know if they (udisks upstream) have any good way to
detect that a userspace filesystem driver is available for a given
filesystem. Individual fuse drivers don't seem to have a naming
convention (fusefat, fuse2fs) though at least on Debian some of them
seem to end up as /sbin/mount.fuse.$FSTYPE.
guestmount seems to boot the running kernel in qemu and use that? So I
guess it's hard for guestmount itself even to tell you what formats it
supports? I'm probably just ignorant on that issue.
--D
> //richard
>
next prev parent reply other threads:[~2025-04-08 14:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-19 19:13 [PATCH] hfs/hfsplus: fix slab-out-of-bounds in hfs_bnode_read_key Vasiliy Kovalev
2025-03-20 19:30 ` Salvatore Bonaccorso
2025-03-24 16:14 ` Cengiz Can
2025-03-24 16:17 ` Greg KH
2025-03-24 18:43 ` Cengiz Can
2025-03-24 18:53 ` Greg KH
2025-04-06 16:07 ` Cengiz Can
2025-04-06 16:28 ` Greg KH
2025-04-07 10:59 ` Christian Brauner
2025-04-07 17:15 ` Christian Brauner
2025-04-07 17:29 ` Attila Szasz
2025-04-07 19:08 ` Darrick J. Wong
2025-04-08 10:11 ` Richard Weinberger
2025-04-08 14:50 ` Darrick J. Wong [this message]
2025-04-08 15:58 ` Richard Weinberger
2025-04-16 15:10 ` Eric Sandeen
2025-04-08 8:03 ` Greg KH
2025-04-08 12:00 ` Attila Szasz
2025-03-27 19:15 ` Attila Szasz
2025-04-07 17:25 ` Christian Brauner
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=20250408145053.GJ6266@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=brauner@kernel.org \
--cc=carnil@debian.org \
--cc=cengiz.can@canonical.com \
--cc=dutyrok@altlinux.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-patches@linuxtesting.org \
--cc=richard.weinberger@gmail.com \
--cc=stable@vger.kernel.org \
--cc=syzbot+5f3a973ed3dfb85a6683@syzkaller.appspotmail.com \
--cc=szasza.contact@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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