by mnw21cam · 10y ago · 0 comments
grep commit_creds /proc/kallsyms
grep prepare_kernel_cred /proc/kallsyms
Then update addresses as shown in one of the code snippets: _commit_creds commit_creds = 0xffffffff81094250;
_prepare_kernel_cred prepare_kernel_cred = 0xffffffff81094550;As a normal user, grepping these values I actually get 0000000000000000. I can't imagine these being the actual values. Is it possible that because I remount my /proc with the hidepid=2 option the values are not visible for normal non-root accounts?
^-- this version should do that automatically
$ uname -r
4.3.3-2-ARCH
No root: $ ./cve_2016_0728 PP_KEY
uid=1000, euid=1000
Increfing...
finished increfing
forking...
finished forking
caling revoke...
uid=1000, euid=1000
Only took about 25 minutes on a Lenovo core i7. That's kind of scary.EDIT: Actually it seems that atomic_t is 64 bits long with x86_64 these days, so no hope of overflowing.
include/asm-generic/atomic-long.h:
#if BITS_PER_LONG == 64
typedef atomic64_t atomic_long_t;
...
#else
typedef atomic_t atomic_long_t;
Just checking it with a 32-bit VM with the latest upstream kernel.EDIT: No, I was wrong. atomic_t is 32 bits also with 64 bit architecture. Must be something else then, let's see.