Oracle Linux UEK ANSSI-BP-028 (enhanced) : openh264 error

Pagina: 1
Acties:

Vraag


Acties:
  • 0 Henk 'm!

  • El_Bartholomew
  • Registratie: Maart 2010
  • Laatst online: 12-03 19:52
Ik ben overgestapt van Rocky Linux naar Oracle UEK.
Heb bij de installatie eigenlijk voor de lol de beveiligingsoptie ANSSI-BP-028 (enhanced) geselecteerd.
Deze optie vereist een hele reeks partities (vraag me niet waarom want dat gaat boven mijn pet uit) want standaard gooide ik altijd alles onder /.
Ik heb alle partities beveiligd met LUKS2 behalve de boot.

Daarna een repo om kde te installeren ipv de standaard meegeleverde Gnome gezien ik een KDE fanboy ben.

Heb dit op verschillende hardeware en laptops geprobeerd.
Alles werkt behalve als ik software via Flatpak wil installeren.

Dan krijg ik een foutmelding bij installeren van flatpak software : openh264-extension | [Bug]: script failed, exit status 256

Overal lopen zoeken, dan dit bij Flatpak gemeld die mij doorverwezen naar de mensen die verantwoordelijk zijn voor de openh264-extension en die dit ook niet weten.

Mijn kennis is summier en ben maar een hobby knutselaar met Linux.

Ik kreeg deze vraag voorgeschoteld:

Is there anything special about the partitions? Like, noexec flag on /var or /var/tmp or something along those lines?

Iemand onder de Linux goden aanwezig of dit van toepassing is bij Oracle UEK / ANSSI-BP-028 (enhanced) ?

Bedankt voor dit te lezen alleszins.

Alle reacties


Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 20:57

Hero of Time

Moderator LNX

There is only one Legend

Aangezien je meld dat er een hoop aparte partities zijn gemaakt en je wordt gevraagd of er een noexec wordt toegepast, is het handig om je /etc/fstab even te posten in code tags. Dan zie je het al snel genoeg en hebben we wat meer info om mee te werken.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
El_Bartholomew schreef op woensdag 14 februari 2024 @ 18:03:
Is there anything special about the partitions? Like, noexec flag on /var or /var/tmp or something along those lines?
code:
1
findmnt -R /var

code:
1
stat /var{,/tmp}

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • 0 Henk 'm!

  • El_Bartholomew
  • Registratie: Maart 2010
  • Laatst online: 12-03 19:52
Ik heb daarnet een nieuwe installatie gedaan en zal vanavond de /etc/fstab posten.

Een aantal zaken waren ophelderend omdat ik nu naar het bericht keek (ik moest scrollen door een klein scherm om alles te kunnen zien) welke taken er werden uitgevoerd bij het selecteren van de optie ANSSI-BP-028 (enhanced):

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Mount option ‘nosuid’ added for the mount point /srv
Mount option ‘noexec’ added for the mount point /tmp
Mount option ‘nosuid’ added for the mount point /tmp
Mount option ‘noexec’ added for the mount point /var
Mount option ‘nosuid’ added for the mount point /var
Mount option ‘noexec’ added for the mount point /var/log
Mount option ‘nosuid’ added for the mount point /var/log
Mount option ‘noexec’ added for the mount point /var/tmp
Mount option ‘nosuid’ added for the mount point /var/tmp
Mount option ‘noexec’ added for the mount point /boot
Mount option ‘nosuid’ added for the mount point /boot
Mount option ‘nosuid’ added for the mount point /opt
package ‘aide’ has been added to the list of to be installed packages
package ‘chrony’ has been added to the list of to be installed packages
package ‘dnf-automatic’ has been added to the list of to be installed packages
package ‘sudo’ has been added to the list of to be installed packages
package ‘rsyslog-gnutis’ has been added to the list of to be installed packages
package ‘rsh-server’ has been added to the list of excluded packages
package ‘xinetd’ has been added to the list of excluded packages
package ‘tftp’ has been added to the list of excluded packages
package ‘talk’ has been added to the list of excluded packages
package ‘rsh’ has been added to the list of excluded packages
package ‘dhcp’ has been added to the list of excluded packages
package ‘telnet’-server’ has been added to the list of excluded packages
package ‘tftp-server’ has been added to the list of excluded packages
package  ‘talk-server’ has been added to the list of excluded packages
package  ‘telnet’ has been added to the list of excluded packages
package  ‘sendmail’ has been added to the list of excluded packages

Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 20:57

Hero of Time

Moderator LNX

There is only one Legend

Nou, daar heb je dus iig al het antwoord, de mount points hebben noexec. Net datgeen dat flatpak bijt. Er zal vast het een en ander in /var gedaan worden namelijk. Mogelijk zelfs een script dat 'eventjes' in /var/tmp wordt gezet en dat werkt ook niet.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • El_Bartholomew
  • Registratie: Maart 2010
  • Laatst online: 12-03 19:52
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# /etc/fstab
# Created by anaconda on Fri Feb 16 03:03:22 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/luks-4339839a-4e81-4e53-977c-ed51831d635e /                       xfs     defaults,x-systemd.device-timeout=0 0 0
UUID=0af63b72-99f1-4862-a0b3-b05bc29d5455 /boot                   xfs     defaults,noexec,nosuid 0 0
/dev/mapper/luks-f2721bc7-a802-4079-809e-d6a596da8d56 /home                   xfs     defaults,x-systemd.device-timeout=0,noexec,nosuid 0 0
/dev/mapper/luks-708fca78-250f-4d07-8581-fb0e84603917 /opt                    xfs     defaults,nosuid,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-7d6ef0d9-da10-429f-b7f6-7c0f711b803f /srv                    xfs     defaults,nosuid,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-4f2524a2-70fe-468b-bf0a-c647d7a846e3 /swap                   xfs     defaults,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-c8fda864-5c13-4dc6-8ef6-e6b84248ccaa /tmp                    xfs     defaults,noexec,nosuid,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-226401d8-9e7c-4a69-ac1e-9e6ad10185e2 /var                    xfs     defaults,noexec,nosuid,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-a34e1767-2edc-4372-888d-3cf686f4afa3 /var/log                xfs     defaults,noexec,nosuid,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-0e433057-a332-44e4-b49d-388097a14dee /var/log/audit          xfs     defaults,x-systemd.device-timeout=0 0 0
/dev/mapper/luks-74b470ab-0314-4180-a792-7283665be627 /var/tmp                xfs     defaults,noexec,nosuid,x-systemd.device-timeout=0 0 0

Acties:
  • 0 Henk 'm!

  • El_Bartholomew
  • Registratie: Maart 2010
  • Laatst online: 12-03 19:52
Afbeeldingslocatie: https://tweakers.net/i/Ix37nmbym5Mwon8AwOZgCzdJUiM=/800x/filters:strip_exif()/f/image/hrKgAKlwIXChSXnR1JBYiJtq.png?f=fotoalbum_large

Afbeeldingslocatie: https://tweakers.net/i/lBAbH8YqhqGsfTMEhTX_3HhIfwA=/full-fit-in/4000x4000/filters:no_upscale():fill(white):strip_exif()/f/image/EdQg3MDvE6BKUP0Ek86bHB5d.png?f=user_large

Acties:
  • +1 Henk 'm!

  • El_Bartholomew
  • Registratie: Maart 2010
  • Laatst online: 12-03 19:52
Bedankt voor de info en de hulp.

Heb zelf nu ook iets bijgeleerd ;-)

Acties:
  • +1 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
Onder remount de betreffende twee mounts maar deze keer zonder de noexec mount optie:
code:
1
sudo mount -o remount,defaults,nosuid,x-systemd.device-timeout=0 /dev/mapper/luks-226401d8-9e7c-4a69-ac1e-9e6ad10185e2 /var

code:
1
sudo mount -o remount,defaults,nosuid,x-systemd.device-timeout=0 /dev/mapper/luks-74b470ab-0314-4180-a792-7283665be627 /var/tmp

Daarna controleren ofdat noexec weg is met onder (deze keer zonder truncate aan het einde vd regel -u):
code:
1
findmnt -u -R /var

En proberen ofdat Flatpak installatie nu wel lukt.

Als je dit reboot persistent wilt maken (permanent) dan zal je die noexec optie voor die twee mounts in het /etc/fstab bestandje moeten verwijderen.
Maar ik weet niet ofdat dit verstandig is.

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • +1 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 20:57

Hero of Time

Moderator LNX

There is only one Legend

Het uitvoeren van 'stat' op een map heeft weinig nut trouwens. Je krijgt wel alle informatie erover, maar mappen zullen altijd de execute bit hebben omdat je anders de map niet in mag. De noexec mount optie zal hier geen verandering in brengen, die heeft namelijk alleen effect op bestanden. Zie ook de mount manpage:
code:
1
2
3
4
5
6
exec
    Permit execution of binaries and other executable files.

noexec
    Do not permit direct execution of any binaries on the
    mounted filesystem

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
Hero of Time schreef op zaterdag 17 februari 2024 @ 11:46:
Het uitvoeren van 'stat' op een map heeft weinig nut trouwens.
En als nou die /var folder helemaal geen apparte mount blijkt te zijn of die noexec optie afwezig is, heeft het dan nog steeds "weinig nut" om een stat te draaien?
Van de quote in de OP: "... or something along those lines?".
Is het je bv opgevallen dat de /var/tmp folder een sticky bit heeft (1777)?
$ man chmod
[..]
RESTRICTED DELETION FLAG OR STICKY BIT
       The restricted deletion flag or sticky bit is a single bit,  whose  in-
       terpretation  depends  on  the file type.  For directories, it prevents
       unprivileged users from removing or renaming a file  in  the  directory
       unless  they  own  the  file  or  the directory; this is called the re-
       stricted deletion flag for the directory,  and  is  commonly  found  on
       world-writable  directories like /tmp.  For regular files on some older
       systems, the bit saves the program's text image on the swap  device  so
       it will load more quickly when run; this is called the sticky bit.

Afhankelijk van wat die Flatpack installer allemaal precies doet kan dit mogelijk ook invloed hebben.
Hero of Time schreef op zaterdag 17 februari 2024 @ 11:46:
Je krijgt wel alle informatie erover, ...
Een stat laat niet "alle informatie" zien.
Je hebt ook nog lsattr en getfattr.
De noexec optie is mij bekend.

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • +1 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 20:57

Hero of Time

Moderator LNX

There is only one Legend

@deHakkelaar, mijn post was in reactie op de TS. ;) We zijn beide bekend met de diepere werking van Linux en rechten erop. Ik had de sticky bit ook gezien bij /var/tmp en dat heeft geen invloed op het wel of niet kunnen uitvoeren van scripts daar. IMO zijn scripts die maar falen als het iets daar niet zou kunnen verwijderen omdat het van een andere gebruiker is vanwege de sticky bit slecht geschreven en zou het niet tot een harde faal moeten leiden van installatie, maar melding moeten geven wat er mis is.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
@El_Bartholomew , mogelijk roert die Flatpack installer ook in de /var/tmp/tmp-inst mount en zou je daar ook die noexec ff tijdelijk kunnen verwijderen als instructies boven niet werkt.
Ik weet namelijk niet waar die folder voor dient en is deze mogelijk ook Flatpack gerelateerd.

There are only 10 types of people in the world: those who understand binary, and those who don't


Acties:
  • 0 Henk 'm!

  • deHakkelaar
  • Registratie: Februari 2015
  • Laatst online: 27-07-2024
Ow nog iets anders, zo te zien is de hostnaam "localhost":
code:
1
hostname

code:
1
hostnamectl

code:
1
cat /etc/hostname

Dit is niet aan te raden want dat is een speciale gereserveerde naam voor iets anders:
The name localhost is reserved for loopback purposes.
Wikipedia: localhost

De hostnaam kun je wijzigen met onder ("unable to resolve" waarschuwing negeren):
code:
1
sudo hostnamectl hostname <NEW_HOSTNAME>

En deze ook in het /etc/hosts bestandje aanpassen.
Zoiets als:
dehakkelaar@hak01:~$ sudo nano /etc/hosts
127.0.0.1    localhost
127.0.1.1    hak01

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


EDIT: Will je een FQDN toepassen, pas dan dat eene regeltje aan zoals onder voorbeeld (eerst lange naam gevolgd door korte naam):
code:
1
127.0.1.1    hak01.home.dehakkelaar.nl  hak01

dehakkelaar@hak01:~$ man hostname
[..]
   THE FQDN
       The  FQDN  (Fully Qualified Domain Name) of the system is the name that
       the resolver(3) returns for the host name, such as, ursula.example.com.
       It  is  usually  the hostname followed by the DNS domain name (the part
       after the first dot).  You can check the FQDN using hostname --fqdn  or
       the domain name using dnsdomainname.

       You cannot change the FQDN with hostname or dnsdomainname.

       The  recommended  method of setting the FQDN is to make the hostname be
       an alias for the fully qualified name using /etc/hosts,  DNS,  or  NIS.
       For  example,  if  the  hostname was "ursula", one might have a line in
       /etc/hosts which reads

              127.0.1.1    ursula.example.com ursula

Controleren met:
dehakkelaar@hak01:~$ hostname
hak01

dehakkelaar@hak01:~$ hostname -f
hak01.home.dehakkelaar.nl

dehakkelaar@hak01:~$ hostname -i
127.0.1.1

dehakkelaar@hak01:~$ hostname -I
10.0.0.145

[ Voor 39% gewijzigd door deHakkelaar op 19-02-2024 02:39 ]

There are only 10 types of people in the world: those who understand binary, and those who don't

Pagina: 1