all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 11442@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#11442: dbus uses Emacs integer as pointer, possible core dump
Date: Wed, 09 May 2012 17:45:19 +0200	[thread overview]
Message-ID: <m2vck573zk.fsf@igel.home> (raw)
In-Reply-To: <87y5p1l63u.fsf@gmx.de> (Michael Albinus's message of "Wed, 09 May 2012 17:35:49 +0200")

Michael Albinus <michael.albinus@gmx.de> writes:

> Paul Eggert <eggert@cs.ucla.edu> writes:
>
> Hi Paul,
>
>> 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.
>
> In general, I agree with you. In the given case, it is just a pointer
> address which has been written in Fdbus_init_bus. No other place is
> expected to write such an address, but since it is a Lisp object,
> somebody could do by mistake.

Why is Vdbus_registered_buses exported to lisp?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 15:20 bug#11442: dbus uses Emacs integer as pointer, possible core dump Paul Eggert
2012-05-09 15:35 ` Michael Albinus
2012-05-09 15:45   ` Andreas Schwab [this message]
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=m2vck573zk.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=11442@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --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.