Outils pour utilisateurs

Outils du site


tech:pb_docker_rhel_centos_5_et_6

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:pb_docker_rhel_centos_5_et_6 [2025/03/25 12:23] Jean-Baptistetech:pb_docker_rhel_centos_5_et_6 [2025/10/23 10:22] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Pb RedHat Docker Kernel Sécurité Syscall}}
 +
 +
 +# Pb Docker RHEL CentOS 5 et 6
 +
 +Voir : 
 +* [[Kernel Linux syscall]]
 +* https://www.baeldung.com/linux/vdso-vsyscall-memory-regions
 +
 +
 +~~~
 +$ docker run --rm -ti centos:centos5 /bin/bash
 +[139] $
 +
 +$ docker run --rm -ti centos:centos6 /bin/bash 
 +[139] $
 +~~~
 +
 +Impossible de lancer la plupart des commandes. Code de retour d'erreur : 139
 +
 +## Solution
 +
 +Sur le hôte passer au Kernel Linux l'argument suivant :
 +~~~bash
 +vsyscall=emulate
 +~~~
 +
 +Source :
 +https://unix.stackexchange.com/questions/478387/running-a-centos-docker-image-on-arch-linux-exits-with-code-139ù
 +
 +La version de la glibc est trop ancienne et utilise dans anciens appels système !?
 +
 +
 +
 +Exécutez la commande suivante pour vérifier que votre système a désactivé vsyscall:
 +~~~bash
 +cat /proc/self/maps | egrep 'vdso|vsyscall'
 +~~~
 +
 +La sortie sera semblable à ce qui suit:
 +~~~
 +7fffccfcc000-7fffccfce000 r-xp 00000000 00:00 0                          [vdso]
 +~~~
 +
 +ou à celui-ci:
 +~~~
 +7fffe03fe000-7fffe0400000 r-xp 00000000 00:00 0                          [vdso]
 +ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
 +~~~
 +
 +https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
 +~~~
 + vsyscall= [X86-64,EARLY]
 + Controls the behavior of vsyscalls (i.e. calls to
 + fixed addresses of 0xffffffffff600x00 from legacy
 + code).  Most statically-linked binaries and older
 + versions of glibc use these calls.  Because these
 + functions are at fixed addresses, they make nice
 + targets for exploits that can control RIP.
 +
 + emulate     Vsyscalls turn into traps and are emulated
 +             reasonably safely.  The vsyscall page is
 +     readable.
 +
 + xonly       [default] Vsyscalls turn into traps and are
 +             emulated reasonably safely.  The vsyscall
 +     page is not readable.
 +
 + none        Vsyscalls don't work at all.  This makes
 +             them quite hard to use for exploits but
 +             might break your system.
 +~~~
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki