AppArmorによりFirefoxセグメントが発生する

AppArmorによりFirefoxセグメントが発生する

私はこれがおそらく悪い質問であることを知っていますが、詰まっています。多くのインターネット検索の最後に、私はこれを理解しようとしています。私はDebianでAppArmorを実行しようとしてきました。私は以下の指示に従いました。https://wiki.debian.org/AppArmor/HowToUse

指示の一部に何をすべきかを示します。

sudo perl -pi -e 's,GRUB_CMDLINE_LINUX="(.*)"$,GRUB_CMDLINE_LINUX="$1 apparmor=1 security=apparmor",' /etc/default/grub
sudo update-grub
sudo reboot

仮想マシンでこれを実行するコマンドがわからないため、セーフモードperlでもFirefoxを使用できなくなりました。セグフォルトが発生しました。

Fontconfig error: Cannot load default config file

(firefox:3875): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'
Crash Annotation GraphicsCriticalError: |[0][GFX1]: no fonts - init: 1 fonts: 0 loader: 0 (t=0.206719) [GFX1]: no fonts - init: 1 fonts: 0 loader: 0
[3875] ###!!! ABORT: unable to find a usable font (Sans): file /tmp/buildd/firefox-47.0.1/gfx/thebes/gfxTextRun.cpp, line 1875
[3875] ###!!! ABORT: unable to find a usable font (Sans): file /tmp/buildd/firefox-47.0.1/gfx/thebes/gfxTextRun.cpp, line 1875
Segmentation fault

apt-cache policy apparmor

apparmor:
  Installed: 2.9.0-3
  Candidate: 2.9.0-3
  Version table:
     2.10.95-4~bpo8+2 0
        100 http://ftp.uk.debian.org/debian/ jessie-backports/main amd64 Packages
 *** 2.9.0-3 0
        500 http://ftp.uk.debian.org/debian/ jessie/main amd64 Packages
        500 http://mirror.bytemark.co.uk/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status

/etc/fonts/fonts.conf の ls -l は以下を返します。

-rw-r--r-- 1 root root 5533 Nov 23 2014 /etc/fonts/fonts.conf

次のコマンドを使用してフォント設定パスをエクスポートしようとしました。

export FONTCONFIG_PATH=/etc/fonts

しかし、これは役に立ちません。

パスを確認したため、存在しないフォントを探していることはわかっていますが、今はアイデアがなく、Googleでヘルプが見つかりませんでした。

ベストアンサー1

この問題を解決しました。私がやった方法は、/etc/default/grubを編集し、GRUB_CMDLINE_LINUXを次から変更することでした。

GRUB_CMDLINE_LINUX=" apparmor=1 security=apparmor"

到着

GRUB_CMDLINE_LINUX=""

その後、実行すると問題が解決しますsudo update grubsudo rebootしかし、これはエラーを引き起こすので、衣類は機能しません。

apparmor.common.AppArmorException: 'Warning: unable to find a suitable fs in /proc/mounts, is it mounted?\nUse --subdomainfs to override.\n'

しかし、Debian ガイドのコマンドを使用して問題を再度正常に解決しました。

sudo perl -pi -e 's,GRUB_CMDLINE_LINUX="(.*)"$,GRUB_CMDLINE_LINUX="$1 apparmor=1 security=apparmor",' /etc/default/grub
sudo update-grub
sudo reboot

再起動後にFirefoxを起動しようとしましたが、エラーは発生せず、すべてがうまく機能します。しかし、私のコンピュータで試した後、再びsegfaultの問題が発生し始め、この修正は機能しませんでした。しかし、服の設定ファイルを比較した後、/etc/apparmor.dプロファイルルールが異なることがわかりました。

コンピュータ分割エラールール:

# Last Modified: Tue Aug  2 11:32:25 2016
#include <tunables/global>

/usr/lib/firefox/firefox {
  #include <abstractions/base>

  /usr/bin/firefox r,

}

業務用コンピュータルール:

# Last Modified: Tue Aug  2 11:32:25 2016
#include <tunables/global>

/usr/bin/firefox {
  #include <abstractions/base>
  #include <abstractions/bash>

  /bin/dash ix,
  /usr/bin/firefox r,

}

#include <abstractions/bash>設定ファイルにおよびを追加して/bin/dash ix,パスを変更しましたが、再/usr/bin/firefox起動後の問題が修正されました。

おすすめ記事