diff -Nru gnome-desktop3-3.30.2/debian/changelog gnome-desktop3-3.30.2/debian/changelog --- gnome-desktop3-3.30.2/debian/changelog 2018-11-30 18:02:51.000000000 +0000 +++ gnome-desktop3-3.30.2/debian/changelog 2018-12-11 15:45:20.000000000 +0000 @@ -1,3 +1,41 @@ +gnome-desktop3 (3.30.2-3ubuntu1) disco; urgency=medium + + * Merge with Debian. Remaining changes: + - Add 04_compute_average_color.patch: Compute the avergage color in + gnome-desktop itself, not in unity to fix some races (LP #963140) + - Add tweak_color_computation.patch, Patch from Gord, no patch header, + no bug link. + - Add git_revert_draw_background.patch + - Add ubuntu_language.patch, Port relevant bits from gnome-control-center's + 52_region_language.patch, as required for gnome 3.8+ region panel + - Add ubuntu_language_list_from_SUPPORTED.patch, + Add API to get list of available languages from SUPPORTED file. + To be used by gnome 3.8 region panel language installation. + - Add gnomebg_hidpi_image.patch, + gnome_bg_create_surface: always honor device scale, that fixes the + wallpaper rendering in HiDPI config under ubiquity (LP: #1382291) + - debian/control.in: Don't depend on bubblewrap + - debian/libgnome-desktop-3-17.symbols: + + Add symbols included in Ubuntu patches + - Update Vcs fields and debian/gbp.conf for Ubuntu + + -- Jeremy Bicha Tue, 11 Dec 2018 10:45:20 -0500 + +gnome-desktop3 (3.30.2-3) unstable; urgency=medium + + * Cherry-pick thumbnail-Fix-use-after-free-when-getting-a-preview-icon.patch: + - Fix from gnome-3-30 branch for a potential crash bug + + -- Jeremy Bicha Tue, 11 Dec 2018 10:41:44 -0500 + +gnome-desktop3 (3.30.2-2) unstable; urgency=medium + + * Cherry-pick thumbnail-Handle-non-usrmerged-systems.patch: + - Fix thumbnailer on 32-bit systems where /lib64 is not available. Also + improve handling of usrmerged and non-usrmerged systems. (LP: #1807127) + + -- Jeremy Bicha Mon, 10 Dec 2018 21:28:33 -0500 + gnome-desktop3 (3.30.2-1ubuntu1) disco; urgency=medium * Merge with Debian. Remaining changes: diff -Nru gnome-desktop3-3.30.2/debian/control gnome-desktop3-3.30.2/debian/control --- gnome-desktop3-3.30.2/debian/control 2018-11-30 18:02:51.000000000 +0000 +++ gnome-desktop3-3.30.2/debian/control 2018-12-11 15:45:20.000000000 +0000 @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Jeremy Bicha , Laurent Bigonville +Uploaders: Jeremy Bicha Build-Depends: debhelper (>= 11), docbook-xml, gnome-common, diff -Nru gnome-desktop3-3.30.2/debian/patches/series gnome-desktop3-3.30.2/debian/patches/series --- gnome-desktop3-3.30.2/debian/patches/series 2018-11-30 18:02:51.000000000 +0000 +++ gnome-desktop3-3.30.2/debian/patches/series 2018-12-11 15:45:20.000000000 +0000 @@ -4,3 +4,5 @@ ubuntu_language.patch ubuntu_language_list_from_SUPPORTED.patch gnomebg_hidpi_image.patch +thumbnail-Handle-non-usrmerged-systems.patch +thumbnail-Fix-use-after-free-when-getting-a-preview-icon.patch diff -Nru gnome-desktop3-3.30.2/debian/patches/thumbnail-Fix-use-after-free-when-getting-a-preview-icon.patch gnome-desktop3-3.30.2/debian/patches/thumbnail-Fix-use-after-free-when-getting-a-preview-icon.patch --- gnome-desktop3-3.30.2/debian/patches/thumbnail-Fix-use-after-free-when-getting-a-preview-icon.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnome-desktop3-3.30.2/debian/patches/thumbnail-Fix-use-after-free-when-getting-a-preview-icon.patch 2018-12-11 15:45:20.000000000 +0000 @@ -0,0 +1,72 @@ +From: Bastien Nocera +Date: Tue, 11 Dec 2018 12:59:31 +0100 +Subject: thumbnail: Fix use-after-free when getting a preview icon + +g_file_info_get_attribute_object() is transfer none, so when getting a +preview GIcon from a gvfs-backed file that supports it, we need to +reference the preview otherwise we might crash. + +==19044== Invalid read of size 8 +==19044== at 0x48607E7: get_preview_thumbnail (gnome-desktop-thumbnail.c:978) +==19044== by 0x48607E7: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) +==19044== by 0x401181: main (test-desktop-thumbnail.c:51) +==19044== Address 0x700f750 is 0 bytes inside a block of size 40 free'd +==19044== at 0x4839A0C: free (vg_replace_malloc.c:530) +==19044== by 0x48DFCD0: g_type_free_instance (gtype.c:1943) +==19044== by 0x4E7F7B5: _g_file_attribute_value_clear (gfileattribute.c:176) +==19044== by 0x4E83D46: g_file_info_finalize (gfileinfo.c:327) +==19044== by 0x48C1C61: g_object_unref (gobject.c:3346) +==19044== by 0x48607D5: get_preview_thumbnail (gnome-desktop-thumbnail.c:974) +==19044== by 0x48607D5: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) +==19044== by 0x401181: main (test-desktop-thumbnail.c:51) +==19044== Block was alloc'd at +==19044== at 0x483880B: malloc (vg_replace_malloc.c:299) +==19044== by 0x4B54F20: g_malloc (gmem.c:99) +==19044== by 0x4B6C3C2: g_slice_alloc (gslice.c:1024) +==19044== by 0x4B6C9F8: g_slice_alloc0 (gslice.c:1050) +==19044== by 0x48DFA33: g_type_create_instance (gtype.c:1846) +==19044== by 0x48C2397: g_object_new_internal (gobject.c:1805) +==19044== by 0x48C4113: g_object_new_valist (gobject.c:2128) +==19044== by 0x48C443B: g_object_new (gobject.c:1648) +==19044== by 0x7451CF7: g_vfs_icon_new (gvfsicon.c:178) +==19044== by 0x7451D47: g_vfs_icon_from_tokens (gvfsicon.c:268) +==19044== by 0x4E8BA45: g_icon_new_from_tokens (gicon.c:381) +==19044== by 0x4E8BA45: g_icon_new_for_string (gicon.c:462) +==19044== by 0x7450C5F: _g_dbus_get_file_attribute (gvfsdaemonprotocol.c:300) +==19044== by 0x7450D26: _g_dbus_get_file_info (gvfsdaemonprotocol.c:340) +==19044== by 0x867A74C: g_daemon_file_query_info (gdaemonfile.c:830) +==19044== by 0x486078D: get_preview_thumbnail (gnome-desktop-thumbnail.c:960) +==19044== by 0x486078D: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) +==19044== by 0x401181: main (test-desktop-thumbnail.c:51) +==19044== +==19044== Invalid read of size 8 +==19044== at 0x48607F0: get_preview_thumbnail (gnome-desktop-thumbnail.c:978) +==19044== by 0x48607F0: gnome_desktop_thumbnail_factory_generate_thumbnail (gnome-desktop-thumbnail.c:1058) +==19044== by 0x401181: main (test-desktop-thumbnail.c:51) +==19044== Address 0xaaaaaaaaaaaaaaaa is not stack'd, malloc'd or (recently) free'd + +Root-caused by "Just Me" + +Closes: #87 +(cherry picked from commit 43dac4103d937af8a891646f99d00891b9d84e94) +--- + libgnome-desktop/gnome-desktop-thumbnail.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c +index b31bad5..a490dc1 100644 +--- a/libgnome-desktop/gnome-desktop-thumbnail.c ++++ b/libgnome-desktop/gnome-desktop-thumbnail.c +@@ -967,8 +967,10 @@ get_preview_thumbnail (const char *uri, + if (file_info == NULL) + return NULL; + +- object = g_file_info_get_attribute_object (file_info, +- G_FILE_ATTRIBUTE_PREVIEW_ICON); ++ g_message ("got a preview thumbnail"); ++ ++ object = g_object_ref (g_file_info_get_attribute_object (file_info, ++ G_FILE_ATTRIBUTE_PREVIEW_ICON)); + g_object_unref (file_info); + + if (!object) diff -Nru gnome-desktop3-3.30.2/debian/patches/thumbnail-Handle-non-usrmerged-systems.patch gnome-desktop3-3.30.2/debian/patches/thumbnail-Handle-non-usrmerged-systems.patch --- gnome-desktop3-3.30.2/debian/patches/thumbnail-Handle-non-usrmerged-systems.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnome-desktop3-3.30.2/debian/patches/thumbnail-Handle-non-usrmerged-systems.patch 2018-12-11 15:45:20.000000000 +0000 @@ -0,0 +1,96 @@ +From: Iain Lane +Date: Thu, 6 Dec 2018 13:30:41 +0000 +Subject: thumbnail: Handle non-usrmerged systems and non-existing directories + +On systems where /usr-merge hasn't been carried out, /bin (etc) won't +point to /usr/bin. In that case we should --ro-bind the directory +instead of --symlinking it. + +This implements the suggestion from Simon McVittie on +https://bugzilla.gnome.org/show_bug.cgi?id=787072. + +It also handles source directories not existing, which for example +/lib64 won't on 32-bit systems. + +Closes: #4 +Closes: #89 +--- + libgnome-desktop/gnome-desktop-thumbnail-script.c | 53 +++++++++++++++++++++-- + 1 file changed, 49 insertions(+), 4 deletions(-) + +diff --git a/libgnome-desktop/gnome-desktop-thumbnail-script.c b/libgnome-desktop/gnome-desktop-thumbnail-script.c +index 14e2fed..107feb2 100644 +--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c ++++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c +@@ -506,22 +506,67 @@ setup_seccomp (GPtrArray *argv_array, + #endif + + #ifdef HAVE_BWRAP ++static gboolean ++path_is_usrmerged (const char *dir) ++{ ++ /* does /dir point to /usr/dir? */ ++ g_autofree char *target = NULL; ++ GStatBuf stat_buf_src, stat_buf_target; ++ ++ if (g_stat (dir, &stat_buf_src) < 0) ++ return FALSE; ++ ++ target = g_strdup_printf ("/usr/%s", dir); ++ ++ if (g_stat (target, &stat_buf_target) < 0) ++ return FALSE; ++ ++ return (stat_buf_src.st_dev == stat_buf_target.st_dev) && ++ (stat_buf_src.st_ino == stat_buf_target.st_ino); ++} ++ + static gboolean + add_bwrap (GPtrArray *array, + ScriptExec *script) + { ++ const char * const usrmerged_dirs[] = { "bin", "lib64", "lib", "sbin" }; ++ int i; ++ + g_return_val_if_fail (script->outdir != NULL, FALSE); + g_return_val_if_fail (script->s_infile != NULL, FALSE); + + add_args (array, + "bwrap", + "--ro-bind", "/usr", "/usr", +- "--ro-bind", "/lib", "/lib", +- "--ro-bind", "/lib64", "/lib64", ++ NULL); ++ ++ /* These directories might be symlinks into /usr/... */ ++ for (i = 0; i < G_N_ELEMENTS (usrmerged_dirs); i++) ++ { ++ g_autofree char *absolute_dir = g_strdup_printf ("/%s", usrmerged_dirs[i]); ++ ++ if (!g_file_test (absolute_dir, G_FILE_TEST_EXISTS)) ++ continue; ++ ++ if (path_is_usrmerged (absolute_dir)) ++ { ++ g_autofree char *symlink_target = g_strdup_printf ("/usr/%s", absolute_dir); ++ ++ add_args (array, ++ "--symlink", symlink_target, absolute_dir, ++ NULL); ++ } ++ else ++ { ++ add_args (array, ++ "--ro-bind", absolute_dir, absolute_dir, ++ NULL); ++ } ++ } ++ ++ add_args (array, + "--proc", "/proc", + "--dev", "/dev", +- "--symlink", "usr/bin", "/bin", +- "--symlink", "usr/sbin", "/sbin", + "--chdir", "/", + "--setenv", "GIO_USE_VFS", "local", + "--unshare-all",