From: Jared Finder <jared@finder.org>
To: "Günther Noack" <gnoack3000@gmail.com>
Cc: hanno@hboeck.de, kees@kernel.org, gnoack@google.com,
gregkh@linuxfoundation.org, jannh@google.com,
jirislaby@kernel.org, linux-hardening@vger.kernel.org,
linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
stable@vger.kernel.org
Subject: Re: [PATCH v2] tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN
Date: Sat, 22 Feb 2025 13:07:50 -0800 [thread overview]
Message-ID: <491f3df9de6593df8e70dbe77614b026@finder.org> (raw)
In-Reply-To: <20250221.0a947528d8f3@gnoack.org>
On 2025-02-20 16:10, Günther Noack wrote:
>
> Jared, can you please confirm whether Emacs works now with this patch
> in the kernel?
>
> I am asking this because I realized that the patch had a bug. We are
> erring in the "secure" direction, but not all TIOCL_SELMOUSEREPORT
> invocations work without CAP_SYS_ADMIN.
I confirmed that Emacs worked fine with 6.14-rc1. My understanding is
that the Emacs process relies only on TIOCL_SELPOINTER which it needs to
do to draw the mouse pointer after Emacs' redisplay. It's fine for
TIOCL_SELMOUSEREPORT to not work in an unpriviliged Emacs.
> If this specific selection mode is not needed by Emacs, I think *the
> best thing would be to keep it guarded by CAP_SYS_ADMIN, after all*.
This sounds good to me.
Reading over a documentation proposal for TIOCL_SELMOUSEREPORT
(https://lkml.org/lkml/2020/7/6/249), I can not imagine how a userspace
program that was not acting as the mouse daemon could successfully use
SELMOUSEREPORT as the mouse daemon will be fighting with it. Any
legitimate setting of mouse state (for example, setting the mouse x/y
coordinate) would need to be done with the mouse daemon in the loop, in
which case the mouse daemon might as well send the message itself.
-- MJF
next prev parent reply other threads:[~2025-02-22 21:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 19:33 GPM & Emacs broken in Linux 6.7 -- ok to relax check? Jared Finder
2024-11-29 19:50 ` Jann Horn
2024-12-03 13:53 ` Günther Noack
2024-12-03 14:07 ` Günther Noack
2024-12-14 5:13 ` Jared Finder
2024-12-14 7:47 ` Greg Kroah-Hartman
2024-12-16 15:07 ` [PATCH] tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN Günther Noack
2024-12-16 15:14 ` Greg Kroah-Hartman
2024-12-16 15:17 ` Greg Kroah-Hartman
2024-12-16 15:42 ` Günther Noack
2024-12-21 11:06 ` Günther Noack
2024-12-21 11:10 ` [PATCH v2] " Günther Noack
2024-12-22 8:37 ` Greg Kroah-Hartman
2025-01-10 14:21 ` Günther Noack
2025-01-10 16:50 ` Kees Cook
2025-02-08 15:18 ` Jared Finder
2025-02-08 15:28 ` Greg KH
2025-02-08 16:03 ` Jared Finder
2025-02-09 6:49 ` Greg KH
2025-02-21 0:10 ` Günther Noack
2025-02-22 21:07 ` Jared Finder [this message]
2025-01-12 13:14 ` Greg Kroah-Hartman
2024-12-17 9:09 ` [PATCH] " Günther Noack
2024-12-17 8:47 ` GPM & Emacs broken in Linux 6.7 -- ok to relax check? Hanno Böck
2024-12-17 8:49 ` Greg Kroah-Hartman
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=491f3df9de6593df8e70dbe77614b026@finder.org \
--to=jared@finder.org \
--cc=gnoack3000@gmail.com \
--cc=gnoack@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hanno@hboeck.de \
--cc=jannh@google.com \
--cc=jirislaby@kernel.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=stable@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