Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: segfault when answering 'n' on flatpak install #5763

Closed
4 tasks done
jakedane opened this issue Apr 4, 2024 · 1 comment
Closed
4 tasks done

[Bug]: segfault when answering 'n' on flatpak install #5763

jakedane opened this issue Apr 4, 2024 · 1 comment

Comments

@jakedane
Copy link

jakedane commented Apr 4, 2024

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.15.7

What Linux distribution are you using?

Arch Linux

Linux distribution version

rolling

What architecture are you using?

x86_64

How to reproduce

  1. Install an app, for example Brave Browser, with command flatpak install com.brave.Browser
  2. On the question Proceed with these changes to the system installation? [Y/n]: answer n to not proceed

Expected Behavior

flatpak command exits cleanly.

Actual Behavior

flatpak throws a segmentation fault.

Core was generated by `flatpak install com.brave.Browser'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000706910cf2d49 in g_type_check_instance_is_fundamentally_a (type_instance=0x63fd43502e1e, fundamental_type=80) at ../glib/gobject/gtype.c:4151
4151      if (!type_instance || !type_instance>g_class)  

Full backtrace with debug symbols:
gdb.txt

Additional Information

When I answer y the app installs fine so the segfault only happens when answering n.

@chrisawi
Copy link
Collaborator

chrisawi commented Apr 4, 2024

Can confirm. Bisecting points to 6e3cc82

@hfiguiere hfiguiere self-assigned this Apr 4, 2024
swick added a commit to swick/flatpak that referenced this issue Apr 4, 2024
The transaction ops are a g_autolist(FlatpakTransactionOperation) which
means the list gets freed automatically. Calling g_list_free_full
without clearing the variable to NULL results in a double-free.

Closes: flatpak#5763
Fixes: 6e3cc82 ("Fix memory leaks")
Signed-off-by: Sebastian Wick <[email protected]>
@hfiguiere hfiguiere removed their assignment Apr 4, 2024
GeorgesStavracas pushed a commit to GeorgesStavracas/flatpak that referenced this issue Apr 26, 2024
The transaction ops are a g_autolist(FlatpakTransactionOperation) which
means the list gets freed automatically. Calling g_list_free_full
without clearing the variable to NULL results in a double-free.

Closes: flatpak#5763
Fixes: 6e3cc82 ("Fix memory leaks")
Signed-off-by: Sebastian Wick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants