[Bug 1130923] Re: consolekit: ck-get-x11-display-device segmentation fault

Launchpad Bug Tracker 1130923 at bugs.launchpad.net
Mon Mar 4 19:44:52 UTC 2013


** Branch linked: lp:ubuntu/raring-proposed/consolekit

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to consolekit in Ubuntu.
https://bugs.launchpad.net/bugs/1130923

Title:
  consolekit: ck-get-x11-display-device segmentation fault

Status in “consolekit” package in Ubuntu:
  Triaged
Status in “consolekit” source package in Precise:
  Triaged
Status in “consolekit” source package in Quantal:
  Triaged

Bug description:
  Just updated to 12.04. Everytime I logged into GNOME 3 I got a
  segmentation fault from consolekit, specifically ck-get-x11-display-
  device  (see below). After downloading and building package source I
  found out that this is because I have a hardware device that has a
  long name (blackmagic_serial has 17 characters):

  $ cat /proc/drivers
  /dev/tty             /dev/tty        5       0 system:/dev/tty
  /dev/console         /dev/console    5       1 system:console
  /dev/ptmx            /dev/ptmx       5       2 system
  /dev/vc/0            /dev/vc/0       4       0 system:vtmaster
  rfcomm               /dev/rfcomm   216 0-255 serial
  blackmagic_serial    /dev/blackmagic_serial 249 0-31 serial
  ttyprintk            /dev/ttyprintk   5       3 console
  serial               /dev/ttyS       4 64-111 serial
  pty_slave            /dev/pts      136 0-1048575 pty:slave
  pty_master           /dev/ptm      128 0-1048575 pty:master
  unknown              /dev/tty        4 1-63 console

  
  However in src/ck-sysdeps-linux.c:

  typedef struct tty_map_node {
          struct tty_map_node *next;
          guint major_number;
          guint minor_first;
          guint minor_last;
          char name[16];
          char devfs_type;
  } tty_map_node;

  The following patch solves this issue (simply increasing the array
  size):

  --- ck-sysdeps-linux.c.orig	2013-02-20 13:17:46.971181590 -0800
  +++ ck-sysdeps-linux.c	2013-02-20 13:18:04.491182079 -0800
  @@ -93,7 +93,7 @@
           guint major_number;
           guint minor_first;
           guint minor_last;
  -        char name[16];
  +        char name[32];
           char devfs_type;
   } tty_map_node;
   
  ===================================================

  *** buffer overflow detected ***: /usr/lib/ConsoleKit/ck-get-x11-display-device terminated
  ======= Backtrace: =========
  /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f5310f48807]
  /lib/x86_64-linux-gnu/libc.so.6(+0x109700)[0x7f5310f47700]
  /lib/x86_64-linux-gnu/libc.so.6(+0x1089e6)[0x7f5310f469e6]
  /usr/lib/ConsoleKit/ck-get-x11-display-device[0x401f48]
  /usr/lib/ConsoleKit/ck-get-x11-display-device[0x402355]
  /usr/lib/ConsoleKit/ck-get-x11-display-device[0x401823]
  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f5310e5f76d]
  /usr/lib/ConsoleKit/ck-get-x11-display-device[0x401935]
  ======= Memory map: ========
  00400000-00404000 r-xp 00000000 08:21 4722213                            /usr/lib/ConsoleKit/ck-get-x11-display-device
  00603000-00604000 r--p 00003000 08:21 4722213                            /usr/lib/ConsoleKit/ck-get-x11-display-device
  00604000-00605000 rw-p 00004000 08:21 4722213                            /usr/lib/ConsoleKit/ck-get-x11-display-device
  01628000-01649000 rw-p 00000000 00:00 0                                  [heap]
  7f530fd9b000-7f530fdb0000 r-xp 00000000 08:21 25952362                   /lib/x86_64-linux-gnu/libgcc_s.so.1
  7f530fdb0000-7f530ffaf000 ---p 00015000 08:21 25952362                   /lib/x86_64-linux-gnu/libgcc_s.so.1
  7f530ffaf000-7f530ffb0000 r--p 00014000 08:21 25952362                   /lib/x86_64-linux-gnu/libgcc_s.so.1
  7f530ffb0000-7f530ffb1000 rw-p 00015000 08:21 25952362                   /lib/x86_64-linux-gnu/libgcc_s.so.1
  7f530ffb1000-7f530ffb6000 r-xp 00000000 08:21 4724829                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
  7f530ffb6000-7f53101b5000 ---p 00005000 08:21 4724829                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
  7f53101b5000-7f53101b6000 r--p 00004000 08:21 4724829                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
  7f53101b6000-7f53101b7000 rw-p 00005000 08:21 4724829                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
  7f53101b7000-7f53101b9000 r-xp 00000000 08:21 4719404                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
  7f53101b9000-7f53103b8000 ---p 00002000 08:21 4719404                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
  7f53103b8000-7f53103b9000 r--p 00001000 08:21 4719404                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
  7f53103b9000-7f53103ba000 rw-p 00002000 08:21 4719404                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
  7f53103ba000-7f53103c1000 r-xp 00000000 08:21 25952566                   /lib/x86_64-linux-gnu/librt-2.15.so
  7f53103c1000-7f53105c0000 ---p 00007000 08:21 25952566                   /lib/x86_64-linux-gnu/librt-2.15.so
  7f53105c0000-7f53105c1000 r--p 00006000 08:21 25952566                   /lib/x86_64-linux-gnu/librt-2.15.so
  7f53105c1000-7f53105c2000 rw-p 00007000 08:21 25952566                   /lib/x86_64-linux-gnu/librt-2.15.so
  7f53105c2000-7f53105da000 r-xp 00000000 08:21 25952564                   /lib/x86_64-linux-gnu/libpthread-2.15.so
  7f53105da000-7f53107d9000 ---p 00018000 08:21 25952564                   /lib/x86_64-linux-gnu/libpthread-2.15.so
  7f53107d9000-7f53107da000 r--p 00017000 08:21 25952564                   /lib/x86_64-linux-gnu/libpthread-2.15.so
  7f53107da000-7f53107db000 rw-p 00018000 08:21 25952564                   /lib/x86_64-linux-gnu/libpthread-2.15.so
  7f53107db000-7f53107df000 rw-p 00000000 00:00 0 
  7f53107df000-7f531081b000 r-xp 00000000 08:21 25952333                   /lib/x86_64-linux-gnu/libpcre.so.3.12.1
  7f531081b000-7f5310a1a000 ---p 0003c000 08:21 25952333                   /lib/x86_64-linux-gnu/libpcre.so.3.12.1
  7f5310a1a000-7f5310a1b000 r--p 0003b000 08:21 25952333                   /lib/x86_64-linux-gnu/libpcre.so.3.12.1
  7f5310a1b000-7f5310a1c000 rw-p 0003c000 08:21 25952333                   /lib/x86_64-linux-gnu/libpcre.so.3.12.1
  7f5310a1c000-7f5310a1e000 r-xp 00000000 08:21 25952370                   /lib/x86_64-linux-gnu/libdl-2.15.so
  7f5310a1e000-7f5310c1e000 ---p 00002000 08:21 25952370                   /lib/x86_64-linux-gnu/libdl-2.15.so
  7f5310c1e000-7f5310c1f000 r--p 00002000 08:21 25952370                   /lib/x86_64-linux-gnu/libdl-2.15.so
  7f5310c1f000-7f5310c20000 rw-p 00003000 08:21 25952370                   /lib/x86_64-linux-gnu/libdl-2.15.so
  7f5310c20000-7f5310c3d000 r-xp 00000000 08:21 4724832                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
  7f5310c3d000-7f5310e3c000 ---p 0001d000 08:21 4724832                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
  7f5310e3c000-7f5310e3d000 r--p 0001c000 08:21 4724832                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
  7f5310e3d000-7f5310e3e000 rw-p 0001d000 08:21 4724832                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
  7f5310e3e000-7f5310ff3000 r-xp 00000000 08:21 25952562                   /lib/x86_64-linux-gnu/libc-2.15.so
  7f5310ff3000-7f53111f2000 ---p 001b5000 08:21 25952562                   /lib/x86_64-linux-gnu/libc-2.15.so
  7f53111f2000-7f53111f6000 r--p 001b4000 08:21 25952562                   /lib/x86_64-linux-gnu/libc-2.15.so
  7f53111f6000-7f53111f8000 rw-p 001b8000 08:21 25952562                   /lib/x86_64-linux-gnu/libc-2.15.so
  7f53111f8000-7f53111fd000 rw-p 00000000 00:00 0 
  7f53111fd000-7f53112ef000 r-xp 00000000 08:21 25952337                   /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3
  7f53112ef000-7f53114ef000 ---p 000f2000 08:21 25952337                   /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3
  7f53114ef000-7f53114f0000 r--p 000f2000 08:21 25952337                   /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3
  7f53114f0000-7f53114f1000 rw-p 000f3000 08:21 25952337                   /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3
  7f53114f1000-7f53114f2000 rw-p 00000000 00:00 0 
  7f53114f2000-7f5311621000 r-xp 00000000 08:21 4721138                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
  7f5311621000-7f5311821000 ---p 0012f000 08:21 4721138                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
  7f5311821000-7f5311822000 r--p 0012f000 08:21 4721138                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
  7f5311822000-7f5311826000 rw-p 00130000 08:21 4721138                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
  7f5311826000-7f5311848000 r-xp 00000000 08:21 25952577                   /lib/x86_64-linux-gnu/ld-2.15.so
  7f5311a22000-7f5311a28000 rw-p 00000000 00:00 0 
  7f5311a3e000-7f5311a3f000 rw-p 00000000 00:00 0 
  7f5311a3f000-7f5311a46000 r--s 00000000 08:21 4729389                    /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
  7f5311a46000-7f5311a48000 rw-p 00000000 00:00 0 
  7f5311a48000-7f5311a49000 r--p 00022000 08:21 25952577                   /lib/x86_64-linux-gnu/ld-2.15.so
  7f5311a49000-7f5311a4b000 rw-p 00023000 08:21 25952577                   /lib/x86_64-linux-gnu/ld-2.15.so
  7fff9f81e000-7fff9f83f000 rw-p 00000000 00:00 0                          [stack]
  7fff9f8b2000-7fff9f8b3000 r-xp 00000000 00:00 0                          [vdso]
  ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/1130923/+subscriptions




More information about the foundations-bugs mailing list