Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671202 - x11-libs/gtk+: Missing validation that style object is being accessed results in segfault in pango_layout_clear_lines()
Summary: x11-libs/gtk+: Missing validation that style object is being accessed results...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://gitlab.gnome.org/GNOME/gtk/is...
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2018-11-15 17:28 UTC by Kristian Fiskerstrand (RETIRED)
Modified: 2018-11-17 17:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
backtrace (xfce4-terminal-pango-segfault-2.txt,7.61 KB, text/plain)
2018-11-15 17:28 UTC, Kristian Fiskerstrand (RETIRED)
Details
valgrind (valgrind-3.txt,27.21 KB, text/plain)
2018-11-15 21:46 UTC, Kristian Fiskerstrand (RETIRED)
Details
is_style.patch (0001-style.patch,679 bytes, patch)
2018-11-16 18:03 UTC, Kristian Fiskerstrand (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Fiskerstrand (RETIRED) gentoo-dev 2018-11-15 17:28:22 UTC
Created attachment 555212 [details]
backtrace

Triggering when accessing settings of xfce4-terminal, attached backtrace including debug signals. 

Possibly related to https://gitlab.gnome.org/GNOME/pango/issues/309

calypso /home/kristianf # emerge --info
Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop, gcc-7.3.0, glibc-2.27-r6, 4.19.1-gentoo-kf2 x86_64)
=================================================================
System uname: Linux-4.19.1-gentoo-kf2-x86_64-Intel-R-_Core-TM-_i7-8650U_CPU_@_1.90GHz-with-gentoo-2.6
KiB Mem:    16333228 total,  12305084 free
KiB Swap:          0 total,         0 free
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE -AGPL-3 -AGPL-3+ freedist"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -funroll-loops -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /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="-O2 -funroll-loops -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="https://binhost.sumptuouscapital.com"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups curl cxx dbus dri dts dvd dvdr elogind emboss encode exif fam flac fortran gdbm gif glamor gnutls gpg gpm gtk iconv icu ipv6 jpeg latex lcms ldap libnotify libtirpc mad mmx mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis wxwidgets x264 xattr xcb xkb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="nss" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard libinput mouse evdev wacom" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-javascript" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nouveau intel i915 i965 fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Kristian Fiskerstrand (RETIRED) gentoo-dev 2018-11-15 21:46:03 UTC
Created attachment 555290 [details]
valgrind

This might be xfce4-terminal passing uninitialized memory through gtk+, see attached valgrind
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-11-16 07:58:38 UTC
If you want to debug it further, it would be nice to inline the macro on line 242 and see which specific line is failing.
Comment 3 Kristian Fiskerstrand (RETIRED) gentoo-dev 2018-11-16 15:11:30 UTC
(In reply to Michał Górny from comment #2)
> If you want to debug it further, it would be nice to inline the macro on
> line 242 and see which specific line is failing.

So, we debugged this route and concluded that the issue is irrelevant for my crash.

However, what might be related is that this system actually does use scaling (although it still crashes when I change User interface scaling to normal). Original resolution is 

Screen 0: minimum 8 x 8, current 3240 x 2160, maximum 32767 x 32767
eDP1 connected primary 3240x2160+0+0 (normal left inverted right x axis y axis) 320mm x 210mm
   3240x2160     59.99*+
Comment 4 Kristian Fiskerstrand (RETIRED) gentoo-dev 2018-11-16 18:03:29 UTC
Created attachment 555340 [details, diff]
is_style.patch

So, at least my own issue is fixed by this patch that does an assert of style object before accessing it