asm-generic: uaccess: add missing access_ok() check to strnlen_user()
The strnlen_user() function was missing a access_ok() check on the pointer given. We've had cases on Blackfin systems where test programs caused kernel crashes here because userspace passed up a NULL/-1 pointer and the kernel gladly attempted to run strlen() on it. Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Showing
想要评论请 注册 或 登录