Debian Bug report logs - #940563
gdb cannot read exe from another container (attach)

version graph

Package: gdb; Maintainer for gdb is Héctor Orón Martínez <[email protected]>; Source for gdb is src:gdb (PTS, buildd, popcon).

Reported by: Tycho Kirchner <[email protected]>

Date: Tue, 17 Sep 2019 11:33:27 UTC

Severity: normal

Found in version gdb/8.2.1-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected], Héctor Orón Martínez <[email protected]>:
Bug#940563; Package gdb. (Tue, 17 Sep 2019 11:33:29 GMT) (full text, mbox, link).


Acknowledgement sent to Tycho Kirchner <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected], Héctor Orón Martínez <[email protected]>. (Tue, 17 Sep 2019 11:33:29 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Tycho Kirchner <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: gdb cannot read exe from another container (attach)
Date: Tue, 17 Sep 2019 13:32:38 +0200
Package: gdb
Version: 8.2.1-2
Severity: normal

Hi,
When attaching to a process which resides in another mount-namespace, warnings
are printed and while debugging symbols are not resolved. Besides that it seems
to work though. The messages are:

(gdb) attach 26303
Attaching to process 26303
warning: "target:/bin/bash": could not open as an executable file: Operation
not permitted.
warning: `target:/bin/bash': can't open to read symbols: Operation not
permitted.
warning: Could not load vsyscall page because no executable was specified
0x00007ff1f2368681 in ?? ()

Steps to reproduce:

In Terminal 1:
$ sudo unshare -m
$ su $YOUR_USER # running as your user should allow gdb attach
$ echo $$
# -> note the PID


In Terminal 2:
$ gdb
attach $PID

Tested with gdb versions 7.12-6 and 8.2.1-2.
On CentOS with gdb 7.6.1 the problem does *not* occur, so I suspect there is a
debian-specific security-policy active, which causes that behaviour.

Thanks
Tycho



-- System Information:
Debian Release: 9.11
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-debug'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-11-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gdb depends on:
ii  libbabeltrace-ctf1  1.5.1-1
ii  libbabeltrace1      1.5.1-1
ii  libc6               2.24-11+deb9u4
ii  libexpat1           2.2.0-2+deb9u2
ii  libipt1             1.5-1
ii  liblzma5            5.2.2-1.2+b1
ii  libncurses5         6.0+20161126-1+deb9u2
ii  libpython3.5        3.5.3-1+deb9u1
ii  libreadline7        7.0-3
ii  libtinfo5           6.0+20161126-1+deb9u2
ii  zlib1g              1:1.2.8.dfsg-5

Versions of packages gdb recommends:
ii  libc6-dbg [libc-dbg]  2.24-11+deb9u4

Versions of packages gdb suggests:
pn  gdb-doc    <none>
pn  gdbserver  <none>

-- no debconf information



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Nov 11 13:31:47 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.