Brecha "Dirty cow" (kernel linux): ¡Actualización requerida!

[h] ¿Qué hacer frente a la brecha “Zero Day” en el Kernel Linux que permite escalar privilegios y que se ha desvelado este 21 de Octubre?
¿Cómo librarse de la “Vaca Sucia”?[/h]
https://www.wifi-libre.com/img/members/3/dirty_cow_1.jpg

La brecha de seguridad CVE-2016-5195 fue desvelada este viernes por Phil Oester
[list=]
]CVE-2016-5195 @ RedHat/]
[/list]
Su nombre de código es “Dirt cow
https://www.wifi-libre.com/img/members/3/dirty_cow_2.jpg
[list=
]
]CVE-2016-5195 - Dirty COW (CVE-2016-5195) is a privilege escalation vulnerability in the Linux Kernel de ninja @ dirtycow.ninja/]
[/list]

Hablamos de una brecha que afecta el corazón de nuestro sistema operativo basado en Linux.
Todo sistema operativo que usa un kernel superior al 2.6 es potencialmente vulnerable
La brecha es de tipo “escala de privilegios”.
Un usuario sin derechos de administrador puede editar los ficheros que debería solo poder leer.

Es una brecha sería para los administradores, sobre todo si se enfrentan a  un ataque que viene "de dentro de la red". 
  Los usuarios "normales" no corren realmente peligro...
  Pero es mucho mejor arreglar la vulnerabilidad: Una de las cosas que hace que un sistema linux sea más seguro es justamente la necesidad de entrar una contraseña de administrador o de usuario sudo para escribir en ficheros críticos, instalar cosas etc...

. Cualquier agujero es una amenaza potencial.

La brecha fue arreglada por el propio Linus Trovalds
Había hecho un apaño en 2005… No fue bastante:

[quote] This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a (“Fix get_user_pages() race for write access”) but that was then undone due to problems on s390 by commit f33ea7f404e5 (“fix get_user_pages bug”).

In the meantime, the s390 situation has long been fixed, and we can now fix it by checking the pte_dirty() bit properly (and do it better). The s390 dirty bit was implemented in abf09bed3cce (“s390/mm: implement software dirty bits”) which made it into v3.9. Earlier kernels will have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the “yes, we already did a COW” rather than play racy games with FOLL_WRITE that is very fundamental, and then use the pte dirty flag to validate that the FOLL_COW flag is still valid.[/quote]

El patch esta disponible y se instalara automáticamente con una actualización completa del sistema.

Para sistemas basados en debian y Ubuntu:

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

Si tienes un router con opemWRT o un teléfono con Android no te olvides que están también potencialmente afectados.

Existen varios códigos PoC basados en esta brecha por si quieres probar
[list=*]
]list of POC @ dirtycow.github.io/]
[/list]

Lo importante:
Mantener su sistema bien actualizado del todo ( upgrade + dist-upgrade)
Para que no te pille la vaca sucia :wink:
[video]youtube.com/watch?v=kEsshExn7aE[/video]
Más lectura…
[list=*]
][ 21/Oct/2016 ]](http://www.cyberciti.biz/faq/dirtycow-linux-cve-2016-5195-kernel-local-privilege-escalation-vulnerability-fix/) de Vivek GITE @ NixCraft /]
[/list]