For the English version of this alert, click here.
Allele Security Alert
ASA-2019-00553
Identificador(es)
ASA-2019-00553, CVE-2019-2215
Título
Use-after-free no driver Binder
Fabricante(s)
Linux foundation
Produto(s)
Linux kernel
Versão(ões) afetada(s)
Linux kernel versões anteriores a 4.16
Linux kernel versões anteriores a 4.15.1
Linux kernel versões anteriores a 4.14.17
Linux kernel versões anteriores a 4.9.196
Linux kernel versões anteriores a 4.4.196
Versão(ões) corrigida(s)
Linux kernel versão 4.16
Linux kernel versão 4.15.1
Linux kernel versão 4.14.17
Linux kernel versão 4.9.196
Linux kernel versão 4.4.196
Prova de conceito
Sim
Descrição
Existe uma vulnerabilidade de use-after-free do membro wait na struct binder_thread no driver binder localizado em /drivers/android/binder.c.
Detalhes técnicos
A função binder_poll() passa thread->wait waitqueue que pode se encontrar em estado adormecido. Quando uma thread que usa epoll é finalizada explicitamente usando BINDER_THREAD_EXIT, uma waitqueue é liberada, mas nunca é removida da estrutura de dados epoll correspondente. Quando o processo é encerrado posteriormente, o código de limpeza da epoll tenta acessar a waitlist, o que resulta em use-after-free.
Créditos
syzkaller
Maddie Stone (Google Project Zero)
Referência(s)
Issue 1942: Android: Use-After-Free in Binder driver
https://bugs.chromium.org/p/project-zero/issues/detail?id=1942
Tailoring CVE-2019-2215 to Achieve Root
https://hernan.de/blog/2019/10/15/tailoring-cve-2019-2215-to-achieve-root/
CVE-2019-2215
https://github.com/marcinguy/CVE-2019-2215/blob/master/README.md
binder epoll bug (was KASAN: use-after-free Read in __lock_acquire (2))
https://lore.kernel.org/lkml/20171213000517.GB62138@gmail.com/
ANDROID: binder: remove waitqueue when thread exits.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/android/binder.c?h=linux-4.14.y&id=7a3cee43e935b9d526ad07f20bf005ba7e74d05b
609966:UPSTREAM: ANDROID: binder: remove waitqueue when thread exits.
https://android-review.googlesource.com/c/kernel/common/+/609966
573742:UPSTREAM: ANDROID: binder: remove waitqueue when thread exits.
https://android-review.googlesource.com/c/kernel/common/+/573742/
609868:UPSTREAM: ANDROID: binder: remove waitqueue when thread exits.
https://android-review.googlesource.com/c/kernel/common/+/609868/
ANDROID: binder: remove waitqueue when thread exits.
https://github.com/torvalds/linux/commit/f5cb779ba16334b45ba8946d6bfa6d9834d1527f
Android Security Bulletin—October 2019
https://source.android.com/security/bulletin/2019-10-01
Linux kernel 4.14.17
https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.17
Linux kernel 4.15.1
https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.15.1
Linux kernel 4.4.196
https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.196
CVE-2019-2215
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-2215
CVE-2019-2215
https://nvd.nist.gov/vuln/detail/CVE-2019-2215
Se encontrou algum erro neste alerta ou deseja uma análise compreensiva, entre em contato.
Última modificação: 17 outubro 2019