Bug 1411083

Summary: merge upstream seccomp whilelisted syscalls
Product: [Fedora] Fedora Reporter: Fabrice Bellet <fabrice>
Component: trackerAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dakingun, debarshir, ignatenko
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 19:33:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fabrice Bellet 2017-01-08 09:59:27 UTC
Hi!

I noticed a systematic segfault of tracker-extract on my fedora 24 box, while working on a djvu file. I found that this crash is related to the newly added seccomp sandboxing feature.

Would it make sense to merge some upstream patches that whitelist supplementary syscall. Taken from master, I identified these patches :

47b4958 libtracker-common: Allow querying process stats/limits
c9acfe0 libtracker-common: Handle mlock*/munlock* syscalls
73f5cd5 libtracker-common: Whitelist umask
435eca3 libtracker-common: Whitelist dup/dup2/dup3
88cfdc5 libtracker-common: Whitelist gettimeofday() syscall
2860120 libtracker-common: Whitelist clock_gettime/getres
fff1ba0 libtracker-common: Whitelist more syscalls used on non-x86_64 arches
14f77ae libtracker-common: Whitelist *64() stat/getdents syscalls

F24 (version 1.8.3) can add the first 5 patches
F25 (version 1.10.3) can add the first 5 patches too
devel (version 1.11.2) can add the 8 patches

For information, the crash on djvu files comes from the missing getrusage syscall:

#0  0x00007ffff1a07777 in getrusage () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffc065be30 in _rnd_get_event (e=e@entry=0x7fffd55d70b0) at rnd-common.c:68
#2  0x00007fffc065c3fa in wrap_nettle_rnd_init (ctx=<optimized out>) at rnd.c:230
#3  0x00007fffc05bdcc9 in _gnutls_rnd_init () at random.c:49
#4  0x00007fffc05b17ce in gnutls_global_init () at gnutls_global.c:296
#5  0x00007fffc0592a3c in lib_init () at gnutls_global.c:483
#6  0x00007ffff7de8daa in call_init (l=<optimized out>, argc=argc@entry=3, argv=argv@entry=0x7fffffffde08, env=env@entry=0x55555579d200) at dl-init.c:72
#7  0x00007ffff7de8ebb in call_init (env=0x55555579d200, argv=0x7fffffffde08, argc=3, l=<optimized out>) at dl-init.c:30
#8  _dl_init (main_map=main_map@entry=0x7fffc801e0e0, argc=3, argv=0x7fffffffde08, env=0x55555579d200) at dl-init.c:120
#9  0x00007ffff7dedab1 in dl_open_worker (a=a@entry=0x7fffd55d7640) at dl-open.c:564
#10 0x00007ffff7de8c54 in _dl_catch_error (objname=objname@entry=0x7fffd55d7630, errstring=errstring@entry=0x7fffd55d7638, mallocedp=mallocedp@entry=0x7fffd55d762f, operate=operate@entry=0x7ffff7ded660 <dl_open_worker>, args=args@entry=0x7fffd55d7640) at dl-error.c:187
#11 0x00007ffff7ded009 in _dl_open (file=0x7fffc806c3d0 "/usr/lib64/gstreamer-1.0/libgstlibav.so", mode=-2147483646, caller_dlopen=0x7ffff2f14801 <g_module_open+705>, nsid=-2, argc=<optimized out>, argv=<optimized out>, env=0x55555579d200) at dl-open.c:649
#12 0x00007ffff06f9f09 in dlopen_doit (a=a@entry=0x7fffd55d7870) at dlopen.c:66
#13 0x00007ffff7de8c54 in _dl_catch_error (objname=0x7fffc8002e10, errstring=0x7fffc8002e18, mallocedp=0x7fffc8002e08, operate=0x7ffff06f9eb0 <dlopen_doit>, args=0x7fffd55d7870) at dl-error.c:187
#14 0x00007ffff06fa591 in _dlerror_run (operate=operate@entry=0x7ffff06f9eb0 <dlopen_doit>, args=args@entry=0x7fffd55d7870) at dlerror.c:163
#15 0x00007ffff06f9fa2 in __dlopen (file=file@entry=0x7fffc806c3d0 "/usr/lib64/gstreamer-1.0/libgstlibav.so", mode=<optimized out>) at dlopen.c:87
#16 0x00007ffff2f14801 in _g_module_open (bind_local=<optimized out>, bind_lazy=0, file_name=<optimized out>) at gmodule-dl.c:97
#17 g_module_open (file_name=file_name@entry=0x7fffc40c67a0 "/usr/lib64/gstreamer-1.0/libgstlibav.so", flags=<optimized out>) at gmodule.c:573
#18 0x00007fffd6ccd5cd in _priv_gst_plugin_load_file_for_registry (filename=0x7fffc40c67a0 "/usr/lib64/gstreamer-1.0/libgstlibav.so", registry=0x5555558d3f50, registry@entry=0x0, error=error@entry=0x7fffd55d7ad0) at gstplugin.c:745
#19 0x00007fffd6ccdfca in gst_plugin_load_file (filename=<optimized out>, error=error@entry=0x7fffd55d7ad0) at gstplugin.c:680
#20 0x00007fffd6cce40a in gst_plugin_load_by_name (name=0x7fffc40c3ea0 "libav") at gstplugin.c:1265
#21 0x00007fffd6cced8e in gst_plugin_feature_load (feature=feature@entry=0x7fffc414ab00) at gstpluginfeature.c:111
#22 0x00007fffd6cf4b13 in gst_type_find_factory_call_function (factory=0x7fffc414ab00, find=0x7fffd55d7bb0) at gsttypefindfactory.c:210
#23 0x00007fffd6a334b1 in gst_type_find_helper_get_range (obj=obj@entry=0x7fffc421a3b0, parent=<optimized out>, func=<optimized out>, size=<optimized out>, extension=extension@entry=0x7fffc80010c0 "djvu", prob=prob@entry=0x7fffd55d7c44) at gsttypefindhelper.c:355
#24 0x00007fffd5615ac0 in gst_type_find_element_loop (pad=0x7fffc4212720) at gsttypefindelement.c:1132
#25 0x00007fffd6cf0181 in gst_task_func (task=0x7fffc4220050) at gsttask.c:332
#26 0x00007ffff25d06ee in g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:307
#27 0x00007ffff25cfcf5 in g_thread_proxy (data=0x7fffc420ff70) at gthread.c:780
#28 0x00007ffff1cd85ca in start_thread (arg=0x7fffd55d8700) at pthread_create.c:333
#29 0x00007ffff1a120ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Comment 1 Fedora End Of Life 2017-07-26 00:10:18 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-08-08 19:33:14 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.