xdg-desktop-portal-gnome crashed with SIGSEGV in fast_validate()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xdg-desktop-portal-gnome (Ubuntu) |
Fix Released
|
Medium
|
Iain Lane | ||
Lunar |
Fix Released
|
Medium
|
Iain Lane |
Bug Description
[ Description ]
Screen sharing via the GNOME portal is often crashing due to a use-after-free.
[ Fix ]
An upstream cherry-pick (https:/
[ Test case ]
One way which works for me:
0. Be on GNOME, have a few different programs open (wayland ones, X ones, snaps, not snaps).
1. Open firefox, visit https:/
2. Start a meeting with yourself.
3. Share a window into the meeting. You should get the portal dialog asking you which window to share. Pick any one and share it to the chat.
4. If the bug happens, the window will not be shared, and you should see a crash if you look in `journalctl --user-
It doesn't happen every single time. If you don't see the bug, repeat step 3 a few times choosing different windows and with different timings (wait a few seconds to select the window or do it really fast).
If the bug is fully fixed, you shouldn't see this crash happen at all even after trying lots of times.
Make sure you can reproduce the bug before applying the new package, so you can be more confident it's fixed.
When the crash happens, you see messages in the journal like:
Apr 13 22:33:14 florence xdg-desktop-
Apr 13 22:33:16 florence systemd[2468]: xdg-desktop-
[ What could go wrong? ]
The patch introduces new `dup` and `free` functions for a couple of structs. They are fairly simple but if there's a bug there it could lead to a leak or a different crash.
[ Original Description ]
Tried to share a window under Wayland with obs-studio (installed from a deb) and apport popped up saying xdg-desktop-
ProblemType: Crash
DistroRelease: Ubuntu 23.04
Package: xdg-desktop-
ProcVersionSign
Uname: Linux 6.1.0-16-generic x86_64
NonfreeKernelMo
ApportVersion: 2.26.0-0ubuntu2
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 21 16:25:47 2023
ExecutablePath: /usr/libexec/
InstallationDate: Installed on 2021-08-03 (595 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Alpha amd64 (20210802)
ProcCmdline: /usr/libexec/
ProcEnviron:
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
PATH=(custom, user)
SHELL=/bin/bash
XDG_RUNTIME_
SegvAnalysis:
Segfault happened at: 0x7f67fd7a94a0 <g_utf8_
PC (0x7f67fd7a94a0) ok
source "(%rdi)" (0xa489eeb5ba52
destination "%eax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: xdg-desktop-
StacktraceTop:
g_utf8_validate () at /lib/x86_
g_variant_
() at /lib/x86_
() at /lib/x86_
g_variant_new_va () at /lib/x86_
Title: xdg-desktop-
UpgradeStatus: Upgraded to lunar on 2023-01-27 (52 days ago)
UserGroups: adm cdrom dip libvirt lpadmin lxd plugdev sambashare sbuild sudo
separator:
description: | updated |
Changed in xdg-desktop-portal-gnome (Ubuntu Lunar): | |
status: | In Progress → Fix Committed |
StacktraceTop: ./glib/ gutf8.c: 1516 ./glib/ gutf8.c: 1699 ba526c40 <error: Cannot access memory at address 0xa489eeb5ba526 c40>, max_len=-1, end=0x0) at ../../. ./glib/ gutf8.c: 1689 new_string (string= 0xa489eeb5ba526 c40 <error: Cannot access memory at address 0xa489eeb5ba526 c40>) at ../../. ./glib/ gvariant. c:1270 valist_ new_nnp (str=0x7ffe9a4b 41c8, ptr=0xa489eeb5b a526c40) at ../../. ./glib/ gvariant. c:4870
fast_validate (str=<optimized out>) at ../../.
g_utf8_validate (max_len=<optimized out>, end=<optimized out>, str=<optimized out>) at ../../.
g_utf8_validate (str=0xa489eeb5
g_variant_
g_variant_