user_data: kstrtoul() and friends should taint data as untrusted
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 28 May 2014 13:30:40 +0000 (28 16:30 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 28 May 2014 13:30:40 +0000 (28 16:30 +0300)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_user_data.c

index 0e8d83c..22f2298 100644 (file)
@@ -562,6 +562,7 @@ void check_user_data(int id)
        add_function_hook("__copy_from_user", &match_user_copy, INT_PTR(0));
        add_function_hook("memcpy_fromiovec", &match_user_copy, INT_PTR(0));
        add_function_assign_hook("kmemdup_user", &match_user_assign_function, NULL);
+       add_function_hook("_kstrtoull", &match_user_copy, INT_PTR(2));
 
        add_hook(&match_caller_info, FUNCTION_CALL_HOOK);
        add_member_info_callback(my_id, struct_member_callback);