Gwibber crashes when using PAX

Bug #936032 reported by Jorge Martínez López
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gentoo Linux
Invalid
Critical

Bug Description

I am running Hardened Gentoo on amd64.

Gwibber 3.1.0 only shows the main window for a fraction of a second and then crashes:

jorgeml@baraddur ~ $ gwibber -d -o
warning: line 6432: incompatible stripping characters and condition
warning: line 6444: incompatible stripping characters and condition
Terminado (killed)

The PAX log shows:

Feb 19 10:23:38 baraddur kernel: [ 2678.900447] PAX: execution attempt in: <anonymous mapping>, 27dfbfff000-27e3bfff000 27dfbfff000
Feb 19 10:23:38 baraddur kernel: [ 2678.900453] PAX: terminating task: /usr/bin/python2.7(gwibber):7276, uid/euid: 1000/1000, PC: 0000027dfbfff300, SP: 000003a71dd16be8
Feb 19 10:23:38 baraddur kernel: [ 2678.900456] PAX: bytes at PC: 90 59 49 89 4d f0 49 bb 0a 00 00 00 00 00 00 00 4d 89 5d 00
Feb 19 10:23:38 baraddur kernel: [ 2678.900467] PAX: bytes at SP-8: 0000000000000000 0000027e4f29f119 0000000000000000 0000000000000000 0000000000000000 7fffffff00000001 8fb5602c00000000 757befeaa1d58275 0000027e49fee300 0000027e49fee578 0000027e48053f20

Disabling MPROTECT in Python ( sudo paxctl -m /usr/bin/python2.7 ) solves the issue but that defeates the purpose of a hardened system.

Please let me know if I can be of any help with the troubleshooting.

Thanks in advance.

Bilal Shahid (s9iper1)
Changed in gwibber:
importance: Undecided → High
description: updated
Revision history for this message
Bilal Shahid (s9iper1) wrote :

thanks for the bug report .
can you reproduce it ?
what is gentoo ?
which version of ubuntu you have ?

Changed in gwibber:
status: New → Incomplete
importance: High → Undecided
Revision history for this message
Jorge Martínez López (jorgeml) wrote :

Hello Bilal.

I can reproduce it:

jorgeml@baraddur ~ $ gwibber
warning: line 6432: incompatible stripping characters and condition
warning: line 6444: incompatible stripping characters and condition
Terminado (killed)

Gentoo is a Linux distribution: http://www.gentoo.org/

I do not use Ubuntu.

Thanks!

Revision history for this message
In , Jorge Martínez López (jorgeml) wrote :
Download full text (8.0 KiB)

Gwibber 3.1.0 only shows the main window for a fraction of a second and then crashes:

jorgeml@baraddur ~ $ gwibber -d -o
warning: line 6432: incompatible stripping characters and condition
warning: line 6444: incompatible stripping characters and condition
Terminado (killed)

The PAX log shows:

Feb 19 10:23:38 baraddur kernel: [ 2678.900447] PAX: execution attempt in: <anonymous mapping>, 27dfbfff000-27e3bfff000 27dfbfff000
Feb 19 10:23:38 baraddur kernel: [ 2678.900453] PAX: terminating task: /usr/bin/python2.7(gwibber):7276, uid/euid: 1000/1000, PC: 0000027dfbfff300, SP: 000003a71dd16be8
Feb 19 10:23:38 baraddur kernel: [ 2678.900456] PAX: bytes at PC: 90 59 49 89 4d f0 49 bb 0a 00 00 00 00 00 00 00 4d 89 5d 00
Feb 19 10:23:38 baraddur kernel: [ 2678.900467] PAX: bytes at SP-8: 0000000000000000 0000027e4f29f119 0000000000000000 0000000000000000 0000000000000000 7fffffff00000001 8fb5602c00000000 757befeaa1d58275 0000027e49fee300 0000027e49fee578 0000027e48053f20

Disabling MPROTECT in Python ( sudo paxctl -m /usr/bin/python2.7 ) solves the issue but that defeates the purpose of a hardened system.

Reproducible: Always

Steps to Reproduce:
1. Use a hardened profile and kernel with Pax
2. Run gwibber
3. Watch it crash
Actual Results:
PAX kills the process

Expected Results:
Gwibber should run

Portage 2.1.10.44 (hardened/linux/amd64, gcc-4.5.3, glibc-2.13-r4, 3.2.2-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.2.2-hardened-r1-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.0.3
Timestamp of tree: Wed, 22 Feb 2012 19:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash: 4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.2-r3, 3.2.2
dev-util/cmake: 2.8.6-r4
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.0.3
sys-apps/openrc: 0.9.8.4
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.21.1-r1
sys-devel/gcc: 4.5.3-r2
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc: 2.13-r4
Repositories: gentoo lcd-filtering
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --jobs"
FEATURES="assume-digests binpkg-logs buildsyspkg collision-protect distlocks ebuild-locks fixla...

Read more...

Revision history for this message
In , Jorge Martínez López (jorgeml) wrote :

I have reported it upstream:

https://bugs.launchpad.net/gwibber/+bug/936032

But I am not sure if this was the right approach.

Thanks in advance for your help.

Revision history for this message
In , U-djc (u-djc) wrote :

Could this be a duplicate of bug 329499?

Revision history for this message
In , Jorge Martínez López (jorgeml) wrote :

(In reply to comment #2)
> Could this be a duplicate of bug 329499?

I am not sure, I cannot reproduce it.

jorgeml@baraddur ~ $ python3.2 -c "import ctypes"
jorgeml@baraddur ~ $
jorgeml@baraddur ~ $ python2.7 -c "import ctypes"
jorgeml@baraddur ~ $

I ran a strace of gwibber, the last line is:

mmap(NULL, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x33370023000
+++ killed by SIGKILL +++

Revision history for this message
Jorge Martínez López (jorgeml) wrote :

I have opened a bug at Gentoo's bugzilla.

Changed in gentoo:
importance: Undecided → Unknown
status: New → Unknown
Changed in gentoo:
importance: Unknown → Critical
status: Unknown → New
Revision history for this message
Bilal Shahid (s9iper1) wrote :

that will fix there you concern to them
thanks

no longer affects: gwibber
Revision history for this message
In , Jürgen Geuter (tante) wrote :

jorgeml to find out where the problem lies, can you please start "gwibber-service -o -d" and see if that one crashes as well (make sure that all previous gwibber related processes are killed)?

Revision history for this message
In , Jorge Martínez López (jorgeml) wrote :
Download full text (4.6 KiB)

Here you are:

jorgeml@baraddur ~ $ gwibber-service -o -d
Loading plugin Foursquare version 1.0
Loading plugin FriendFeed version 0.1
Loading plugin Twitter version 1.0
Loading plugin Qaiku version 1.0
Loading plugin Facebook version 1.1
Loading plugin Ping.fm version 0.1
Loading plugin Digg version 1.0
Loading plugin Flickr version 1.0
Loading plugin StatusNet version 1.1
Loading plugin Identi.ca version 1.1
Loading plugin Buzz version 1.0
Identi.ca : DEBUG Setting up monitors
Identi.ca : DEBUG NM Version is 0.9.2.0
Identi.ca : DEBUG NM Version is greater than 0.8.997
Identi.ca : DEBUG Refresh interval is set to 15
Identi.ca : DEBUG ** Starting Refresh - 2012-02-24 08:06:48,63 **
Identi.ca : DEBUG <twitter:private> Performing operation
Identi.ca : DEBUG <twitter:lists> Performing operation
Identi.ca : DEBUG <twitter:receive> Performing operation
Identi.ca : DEBUG <twitter:responses> Performing operation
Identi.ca : DEBUG <identica:receive> Performing operation
Identi.ca : DEBUG <identica:responses> Performing operation
Identi.ca : DEBUG <identica:responses> Adding record
Identi.ca : DEBUG <identica:responses> Finished operation
Identi.ca : DEBUG <identica:private> Performing operation
Identi.ca : DEBUG <identica:receive> Adding record
Identi.ca : DEBUG <identica:receive> Adding record
Identi.ca : DEBUG <identica:receive> Adding record
Identi.ca : DEBUG <identica:receive> Finished operation
Identi.ca : DEBUG <twitter:responses> Finished operation
Identi.ca : DEBUG <twitter:private> Finished operation
Identi.ca : DEBUG <twitter:lists> Finished operation
Identi.ca : DEBUG <identica:private> Finished operation
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
[...]
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Adding record
Identi.ca : DEBUG <twitter:receive> Finished operation
Identi.ca : INFO Loading complete: 1 - []

In another terminal I launch gwibber:

jorgeml@baraddur ~ $ gwibber -o -d
warning: line 6432: incompatible stripping characters and condition
warning: line 6444: incompatible stripping characters and condition
Gwibber GNOME Client: DEBUG Downloading avatar https://secure.gravatar.com/avatar.php?gravatar_id=5e6dc5e21906e4093b92c5c2e7cddb29&default=https%3A%2F%2Ftheme1.status.net%2Fneo%2Fdefault-avatar-stream.png&size=48
Gwibber GNOME Client: DEBUG Downloading avatar https://secure.gravatar.com/avatar.php?...

Read more...

Revision history for this message
In , Jürgen Geuter (tante) wrote :

To be honest this looks like it's pywebkit-gtk which Gwibber uses for rendering (since you don't seem to have similar problems with other GTK apps?).

pywebkitgtk comes with a demo browser (demos/browser.py in the pywebkitgtk install location), does that have similar problems?

Revision history for this message
In , Jorge Martínez López (jorgeml) wrote :

I could not find the browser you mention in the install location (/usr/share/pywebkitgtk)

jorgeml@baraddur /usr/share/pywebkitgtk $ locate browser.py
/usr/lib64/pygtk/2.0/demos/stock_browser.py
/usr/lib64/python2.7/webbrowser.py
/usr/lib64/python2.7/webbrowser.pyc
/usr/lib64/python2.7/webbrowser.pyo
/usr/lib64/python2.7/site-packages/GTG/taskbrowser/browser.py
/usr/lib64/python2.7/site-packages/gourmet/plugins/browse_recipes/browser.py
/usr/lib64/python2.7/site-packages/gourmet/plugins/browse_recipes/browser.pyc
/usr/lib64/python2.7/site-packages/gourmet/plugins/browse_recipes/browser.pyo
/usr/lib64/python2.7/site-packages/picard/browser/browser.py
/usr/lib64/python2.7/site-packages/picard/browser/browser.pyc
/usr/lib64/python2.7/site-packages/picard/browser/browser.pyo
/usr/lib64/python2.7/site-packages/picard/ui/filebrowser.py
/usr/lib64/python2.7/site-packages/picard/ui/filebrowser.pyc
/usr/lib64/python2.7/site-packages/picard/ui/filebrowser.pyo
/usr/lib64/python3.2/webbrowser.py

jorgeml@baraddur /usr/share/pywebkitgtk $ equery belongs /usr/lib64/python2.7/webbrowser.py
 * Searching for /usr/lib64/python2.7/webbrowser.py ...
dev-lang/python-2.7.2-r3 (/usr/lib64/python2.7/webbrowser.py)

Thanks!

Revision history for this message
In , Jürgen Geuter (tante) wrote :

I don't have access to a Gentoo box since my Laptop is getting fixed atm so I can't check, maybe the docs on the pywebkitgtk page are wrong.
Can you hit me on Jabber (<email address hidden>) or irc (tante on freenode) so we can dive into that without spaming all the other subscribers of this bug?

Revision history for this message
In , Jürgen Geuter (tante) wrote :

It's a bug in pywebkitgtk.

*** This bug has been marked as a duplicate of bug 405549 ***

Changed in gentoo:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.