All of lore.kernel.org
 help / color / mirror / Atom feed
From: Earl Chew <echew@ixiacom.com>
To: <linux-kernel@vger.kernel.org>
Subject: %e in /proc/sys/kernel/core_pattern and empty current->comm
Date: Sun, 28 Aug 2011 09:45:08 -0700	[thread overview]
Message-ID: <4E5A7094.90202@ixiacom.com> (raw)

It is possible to set /proc/sys/kernel/core_pattern to %e:

	echo '%e' > /proc/sys/kernel/core_pattern


A couple of interesting effects:

a. Cores will tend to try to overwrite the executable.

    Is this considered an issue ?


b. Apparently it seems possible to set current->comm to be empty:

	prctl(PR_SET_NAME, "", 0, 0, 0);

   No core dump is generated since the resulting corename is empty,
   and filp_open() fails.

   Is this considered a defect, or potential security concern ?


c. Consequential to (b), setting /proc/sys/kernel/core_pattern to empty
   and /proc/sys/kernel/core_uses_pid to zero universally prevents
   core dumps.

   I'm wondering if this behaviour is provided intentionally.


Earl


                 reply	other threads:[~2011-08-28 16:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4E5A7094.90202@ixiacom.com \
    --to=echew@ixiacom.com \
    --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.