Wednesday, October 30, 2019

Re: firefox: unveil and pledge enhancements [11]

This problem was just fixed by matthieu in X:

CVSROOT: /cvs
Module name: xenocara
Changes by: matthieu@cvs.openbsd.org 2019/10/28 13:38:47

Modified files:
dist/fontconfig/src: fccompat.c fccache.c

Log message:
Stop calling chmod() in cache update code.
These calls are useless to toxic and come in the way of adding pledge
to applications (would require 'fattr' which is quite wide).
Discussed with deraadt, millert and jcs.
Submitted upstreams too.

The problem was specifically discover in firefox with pledge and
fattr, just as you experienced, but too close to 6.6 to fix for the
newfangled pledge/unveil stuff that is coming.

Surely you are probably running older code. And your pkg changes
caused a font input to change, and therefore the library wanted to
do a silly chmod.

Solene Rapenne <solene@perso.pw> wrote:

> On Sun, Oct 27, 2019 at 01:18:11PM -0500, joshua stein wrote:
> > If you're following along at home, here's an update for Firefox 70.
> >
> > Now uses an external PATCHFILE so I can keep my feature patches
> > together as separate commits, which are still waiting on upstream
> > integration.
> >
> >
>
> I had a weird bug with this patch, opening a new tab/window was crashing
> the tab, firefox became unusable except for already opened tabs.
>
> Oct 30 22:21:47 solene /bsd: firefox[19433]: pledge "fattr", syscall 15
>
> this happened after I deleted some packages, maybe this is related to
> the .libs-firefox-69.0.2p0 deletion?
>
> Killing firefox and restarting it did not solve the issue, restarting my
> X session did not solve anything. A reboot did.
>
> Oct 30 22:16:18 solene pkg_delete: Removed emacs-26.3-no_x11
> Oct 30 22:16:18 solene pkg_delete: Removed llvm-8.0.1p0
> Oct 30 22:16:19 solene pkg_delete: Removed rust-1.38.0
> Oct 30 22:16:34 solene pkg_delete: Removed neverball-1.6.0p2v0
> Oct 30 22:16:34 solene pkg_delete: Removed neverball-data-1.6.0v0
> Oct 30 22:16:39 solene pkg_delete: Removed spatialindex-1.8.5p1
> Oct 30 22:16:40 solene pkg_delete: Removed noto-fonts-20171024
> Oct 30 22:16:40 solene pkg_delete: Removed gtk+3-cups-3.24.12
> Oct 30 22:16:41 solene pkg_delete: Removed colord-1.3.5p1
> Oct 30 22:16:41 solene pkg_delete: Removed luajit-2.0.5p1
> Oct 30 22:16:41 solene pkg_delete: Removed libgit2-0.28.1
> Oct 30 22:16:41 solene pkg_delete: Removed ninja-1.9.0
> Oct 30 22:16:42 solene pkg_delete: Removed autoconf-2.13p4
> Oct 30 22:16:42 solene pkg_delete: Removed libtool-2.4.2p0
> Oct 30 22:16:42 solene pkg_delete: Removed cbindgen-0.9.1p0
> Oct 30 22:16:42 solene pkg_delete: Removed libgnome-keyring-3.12.0p6
> Oct 30 22:16:42 solene pkg_delete: Removed gtest-1.8.0p3
> Oct 30 22:16:42 solene pkg_delete: Removed noto-emoji-20180810
> Oct 30 22:16:43 solene pkg_delete: Removed yasm-1.3.0p1
> Oct 30 22:16:43 solene pkg_delete: Removed .libs-icu4c-64.2p0
> Oct 30 22:16:43 solene pkg_delete: Removed .libs1-firefox-69.0.2p0
> Oct 30 22:16:43 solene pkg_delete: Removed enet-1.3.13p0
>
> the ktrace of this error is the following
>
> 69879 firefox CALL close(40)
> 69879 firefox RET close 0
> 69879 firefox CALL mmap(0,0x11000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
> 69879 firefox RET mmap 32581767426048/0x1da208ac7000
> 69879 firefox CALL access(0x1da1923a1960,0x2<W_OK>)
> 69879 firefox NAMI "/var/cache/fontconfig"
> 69879 firefox RET access -1 errno 13 Permission denied
> 69879 firefox CALL access(0x1da1923a1960,0<F_OK>)
> 69879 firefox NAMI "/var/cache/fontconfig"
> 69879 firefox RET access 0
> 69879 firefox CALL kbind(0x7f7ffffec9d8,24,0x130d5ec3a798b908)
> 69879 firefox RET kbind 0
> 69879 firefox CALL chmod(0x1da1923a1960,0755<S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH>)
> 69879 firefox PLDG chmod, "fattr", errno 1 Operation not permitted
> 69879 firefox PSIG SIGABRT SIG_DFL
> 69879 firefox NAMI "firefox.core"
> 69879 firefox STRU struct pollfd { fd=16, events=0x3<POLLIN|POLLPRI>, revents=0<> }
> 58643 firefox CALL wait4(69879,0x38dfee4c21c,0x1<WNOHANG>,0)
> 58643 firefox RET wait4 69879/0x110f7
>
>
> my /var/cache/fontconfig permission was 755 for root:wheel , after
> reboot it was the same.
>
> After reboot, I tried reinstalling the packages and delete them again,
> this did not trigger the error again.
>

No comments:

Post a Comment