On 2018-05-12 20:02:40, Landry Breuil <lan...@openbsd.org> wrote:
> On Sat, May 12, 2018 at 08:07:17PM +0900, Bryan Linton wrote:
> > 
> > Adding the "getpw" pledge to "security.sandbox.pledge.content"
> > doesn't fix it.  However adding it to "security.sandbox.pledge.main"
> > lets everything run just fine again.
> 
> Well, i can't reproduce it here, and i have no issue calling 'save link
> as' or 'save page as' dialogs without getpw pledge on main process.
> Though i havent tried *actually* saving the image/page.
> 
> I'll need a bit more context.. can you look at the coredump with egdb
> from ports and try to get the backtrace for the pledge abort, so that we
> figure out if it's within firefox or the glib layers ?
>

% dmesg | grep GENERIC | tail -2
OpenBSD 6.3-current (GENERIC.MP) #14: Thu Apr 26 21:03:52 MDT 2018
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

% ls -la /etc/malloc.conf
ls: /etc/malloc.conf: No such file or directory

% firefox -profilemanager
[create new, blank profile with no add-ons or extensions installed]

[firefox gets killed by pledge() upon "Right-click -> Save link as..."]
firefox[99269]: pledge "getpw", syscall 33

% egdb `which firefox` firefox.core 
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd6.3".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/firefox...done.
[New process 127256]
[New process 197917]
[New process 278895]
[New process 359186]
[New process 490001]
[New process 121875]
[New process 569901]
[New process 262854]
[New process 185179]
[New process 532300]
[New process 186272]
[New process 495833]
[New process 422756]
[New process 195461]
[New process 114351]
[New process 372828]
[New process 596628]
[New process 415519]
[New process 596946]
[New process 181949]
[New process 235073]
Core was generated by `firefox'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000000000000000 in ?? ()
[Current thread is 1 (process 127256)]
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000fea5628401f in WasmFaultHandler(int, siginfo_t*, void*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#2  <signal handler called>
#3  0x0000000000000000 in ?? ()
#4  0x00000fea5628401f in WasmFaultHandler(int, siginfo_t*, void*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#5  <signal handler called>
#6  0x0000000000000000 in ?? ()
#7  0x00000fea5628401f in WasmFaultHandler(int, siginfo_t*, void*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#8  <signal handler called>
#9  0x0000000000000000 in ?? ()
#10 0x00000fea5628401f in WasmFaultHandler(int, siginfo_t*, void*) () from 
/usr/local/lib/firefox/libxul.so.77.0

[...many identical lines deleted]

#2323 0x00000fea5628401f in WasmFaultHandler(int, siginfo_t*, void*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#2324 <signal handler called>
#2325 0x0000000000000000 in ?? ()
#2326 0x00000fea5628401f in WasmFaultHandler(int, siginfo_t*, void*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#2327 <signal handler called>
#2328 0x00000fea53142659 in 
mozilla::ipc::MessageChannel::OnChannelErrorFromLink() () from 
/usr/local/lib/firefox/libxul.so.77.0
#2329 0x00000fea53143c31 in non-virtual thunk to 
mozilla::ipc::ProcessLink::OnChannelError() () from 
/usr/local/lib/firefox/libxul.so.77.0
#2330 0x00000fea53127a2e in event_persist_closure ()
    at 
/usr/obj/ports/firefox-60.0-debug/firefox-60.0/ipc/chromium/src/third_party/libevent/event.c:1580
#2331 event_process_active_single_queue ()
    at 
/usr/obj/ports/firefox-60.0-debug/firefox-60.0/ipc/chromium/src/third_party/libevent/event.c:1639
#2332 0x00000fea531251fe in event_process_active ()
    at 
/usr/obj/ports/firefox-60.0-debug/firefox-60.0/ipc/chromium/src/third_party/libevent/event.c:1741
#2333 event_base_loop () at 
/usr/obj/ports/firefox-60.0-debug/firefox-60.0/ipc/chromium/src/third_party/libevent/event.c:1961
#2334 0x00000fea531129c5 in 
base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#2335 0x00000fea53111417 in MessageLoop::Run() () from 
/usr/local/lib/firefox/libxul.so.77.0
#2336 0x00000fea5311bf35 in base::Thread::ThreadMain() () from 
/usr/local/lib/firefox/libxul.so.77.0
#2337 0x00000fea53116f0a in ThreadFunc(void*) () from 
/usr/local/lib/firefox/libxul.so.77.0
#2338 0x00000fea86975e7e in _rthread_start (v=0xfea57f21ed7) at 
/usr/src/lib/librthread/rthread.c:96
#2339 0x00000fea6eb1ed8b in __tfork_thread () at 
/usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#2340 0x0000000000000000 in ?? ()
(gdb) info threads
  Id   Target Id         Frame 
* 1    process 127256    0x0000000000000000 in ?? ()
  2    process 197917    _thread_sys_poll () at -:3
  3    process 278895    futex () at -:3
  4    process 359186    futex () at -:3
  5    process 490001    futex () at -:3
  6    process 121875    futex () at -:3
  7    process 569901    futex () at -:3
  8    process 262854    futex () at -:3
  9    process 185179    futex () at -:3
  10   process 532300    futex () at -:3
  11   process 186272    futex () at -:3
  12   process 495833    _thread_sys_poll () at -:3
  13   process 422756    futex () at -:3
  14   process 195461    futex () at -:3
  15   process 114351    futex () at -:3
  16   process 372828    futex () at -:3
  17   process 596628    futex () at -:3
  18   process 415519    futex () at -:3
  19   process 596946    futex () at -:3
  20   process 181949    futex () at -:3
  21   process 235073    futex () at -:3

> Are you running within a full desktop environment ?
>

No, I'm running only with CWM.

> dbus is running ?
>

Yes.

% pkg_info | grep dbus
dbus-1.12.6v0       message bus system
dbus-daemon-launch-helper-1.12.6 DBus setuid helper for starting system services
dbus-glib-0.110v0   glib bindings for dbus message system
dbusmenu-qt-0.9.3p4 D-Bus menu implementation for Qt
py-dbus-1.2.6       dbus bindings for Python
py-dbus-common-1.2.6 common files for py-dbus
py3-dbus-1.2.6      dbus bindings for Python

% grep -A2 dbus .xinitrc
if [ -x /usr/local/bin/dbus-launch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then 
        eval `dbus-launch --sh-syntax --exit-with-session`
fi

% top -b1 -g dbus | grep -A100 PID
  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME CPU COMMAND
14787 shoshoni   2    0  852K 1912K sleep/4   poll      1:22 0.00% dbus-daemon
33771 shoshoni   2    0  700K 1952K sleep/2   poll      0:30 0.00% dbus-daemon
86743 _dbus      2    0  896K 1948K sleep/3   poll      0:02 0.00% dbus-daemon
29756 shoshoni   2    0  544K 1172K sleep/7   select    0:00 0.00% dbus-launch

> Are you saving to a network device ? 
>

Firefox gets killed by pledge() as soon as I click "Save as...",
before the dialogue box asking me where to save the file has a
chance to pop up.

Regardless, I would not be trying to save to a network device.

> Using YP ?
> 

No, I am not using YP.

Please let me know if I can provide any more details.

Thank you.

-- 
Bryan

Reply via email to