All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Helge Deller <deller@gmx.de>
Cc: linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] Dump command line of faulting process to syslog
Date: Thu, 4 Aug 2022 02:06:38 -0700	[thread overview]
Message-ID: <YuuMHkMIssKcBYeX@localhost> (raw)
In-Reply-To: <2f4c1abb-ca27-178a-31c3-5e422613e7e8@gmx.de>

On Thu, Aug 04, 2022 at 10:39:52AM +0200, Helge Deller wrote:
> On 8/4/22 10:09, Josh Triplett wrote:
> > On Tue, Aug 02, 2022 at 09:40:50PM +0200, Helge Deller wrote:
> >> On 8/1/22 18:57, Josh Triplett wrote:
> >>> However, it's also an information disclosure in various ways. The
> >>> arguments of a program are often more sensitive than the name, and logs
> >>> have a tendency to end up in various places, such as bug reports.
> >>>
> >>> An example of how this can be an issue:
> >>> - You receive an email or other message with a sensitive link to follow
> >>> - You open the link, which launches `firefox https://...`
> >>> - You continue browsing from that window
> >>> - Firefox crashes (and recovers and restarts, so you don't think
> >>>   anything of it)
> >>> - Later, you report a bug on a different piece of software, and the bug
> >>>   reporting process includes a copy of the kernel log
> >>
> >> Yes, that's a possible way how such information can leak.
> >>
> >>> I am *not* saying that we shouldn't do this; it seems quite helpful.
> >>> However, I think we need to arrange to treat this as sensitive
> >>> information, similar to kptr_restrict.
[...]
> > I don't think we should overload the meaning of dmesg_restrict. But
> > overloading kptr_restrict seems reasonable to me. (Including respecting
> > kptr_restrict==2 by not showing this at all.)
> 
> I'm fine with kptr_restrict, but I'm puzzled for which value of kptr_restrict
> the command line should be shown then.
> By looking at the meaning of kptr_restrict, I think the command line should be
> hidden for values 0-2.
> Do you suggest to add a new value "3" or am I missing something?

I'm suggesting treating it the same as a pointer value:

0: always show command line
1: show command line if read by privileged caller
2: never show command line

That could either use kptr_restrict or use a separate cmdline_restrict.

      reply	other threads:[~2022-08-04  9:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 15:20 [PATCH 0/3] Dump command line of faulting process to syslog Helge Deller
2022-08-01 15:20 ` [PATCH 1/3] proc: Add get_task_cmdline_kernel() function Helge Deller
2022-08-07 14:28   ` kernel test robot
2022-08-07 15:11     ` Helge Deller
2022-08-07 15:11       ` Helge Deller
2022-08-01 15:20 ` [PATCH 2/3] lib/dump_stack: Add dump_stack_print_cmdline() and wire up in dump_stack_print_info() Helge Deller
2022-08-06 14:40   ` [lib/dump_stack] 9ac328fc55: BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/rwsem.c kernel test robot
2022-08-06 14:40     ` kernel test robot
2022-08-01 15:20 ` [PATCH 3/3] x86/fault: Dump command line of faulting process to syslog Helge Deller
2022-08-01 16:57 ` [PATCH 0/3] " Josh Triplett
2022-08-02 19:40   ` Helge Deller
2022-08-04  8:09     ` Josh Triplett
2022-08-04  8:39       ` Helge Deller
2022-08-04  9:06         ` Josh Triplett [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=YuuMHkMIssKcBYeX@localhost \
    --to=josh@joshtriplett.org \
    --cc=deller@gmx.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.