The ring_buffer_resize function in kernel/trace/ring_buffer.c in the profiling subsystem in the Linux kernel before 4.6.1 mishandles certain integer calculations, which allows local users to gain privileges by writing to the /sys/kernel/debug/tracing/buffer_size_kb file.
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Link | Tags |
---|---|
https://source.android.com/security/bulletin/2017-01-01.html | third party advisory |
http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.6.1 | release notes |
http://www.securityfocus.com/bid/95278 | third party advisory vdb entry |
https://github.com/torvalds/linux/commit/59643d1535eb220668692a5359de22545af579f6 | patch vendor advisory |
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=59643d1535eb220668692a5359de22545af579f6 | patch vendor advisory exploit |