all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: 11442@debbugs.gnu.org
Cc: Michael Albinus <michael.albinus@gmx.de>
Subject: bug#11442: dbus uses Emacs integer as pointer, possible core dump
Date: Wed, 09 May 2012 08:20:57 -0700	[thread overview]
Message-ID: <4FAA8B59.8050207@cs.ucla.edu> (raw)

The trunk version of Emacs src/dbusbind.c contains a function
xd_get_connection_address that does this:

     connection = (DBusConnection *) (intptr_t) XFASTINT (val);

This converts an Emacs integer to a pointer without checking
that it is actually of the proper C type.  It is possible
for Lisp code to mistakenly put an integer there that will
cause Emacs to dump core.  Shouldn't this be made safe, so
that Lisp code can't do that?  For example, a DbusConnection *
could be made a proper Lisp pseudovector or misc type or
something like that.  The idea is to avoid a bad pointer
leaking into the C code.





             reply	other threads:[~2012-05-09 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 15:20 Paul Eggert [this message]
2012-05-09 15:35 ` bug#11442: dbus uses Emacs integer as pointer, possible core dump Michael Albinus
2012-05-09 15:45   ` Andreas Schwab
2012-05-09 21:19     ` Michael Albinus
2012-05-09 21:35       ` Paul Eggert

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=4FAA8B59.8050207@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=11442@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.