From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Andi Kleen <ak@suse.de>
Cc: akpm@osdl.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
bastian@suse.de
Subject: Re: [PATCH] Add prctl to modify current->comm
Date: Tue, 07 Sep 2004 18:12:48 +0100 [thread overview]
Message-ID: <1094577168.9599.13.camel@localhost.localdomain> (raw)
In-Reply-To: <20040907142753.GA20981@wotan.suse.de>
On Maw, 2004-09-07 at 15:27, Andi Kleen wrote:
> I considered the potential security issues of a program obscuring
> itself with this interface, but I don't think it matters much
> because a program can already obscure itself when the admin uses
> ps instead of top. In case of a KDE desktop calling everything
> kdeinit is much more obfuscation than the alternative.
Actually its a lot simpler than that. I long ago as a student wrong a
shell which simply did ln [binarytorun] banana; execve(.."banana", ...)
So I agree its not security related. You just need to fix the
implementation
> + case PR_SET_NAME: {
> + struct task_struct *me = current;
> + me->comm[sizeof(me->comm)-1] = 0;
> + if (strncpy_from_user(me->comm, (char *)arg2, sizeof(me->comm)-1) < 0)
> + return -EFAULT;
> + return 0;
> + }
If the strncpy_from_user faults the state of current->comm is undefined.
This strikes me as bad design.
Alan
next prev parent reply other threads:[~2004-09-07 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-07 14:27 Andi Kleen
2004-09-07 17:12 ` Alan Cox [this message]
2004-09-07 21:16 ` Andi Kleen
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=1094577168.9599.13.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bastian@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome