From: Tong Tiangen tongtiangen@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5MJU8 CVE: NA
---------------------------------
Commit 1b1b4dede457 ("arm64: Avoid premature usercopy failure") fixes an usercopy failure issues, it introduced a variable srcin and used it in fixup routine, but the variable is not initialized in __arch_copy_to_user_generic_read(), this will cause an illegal pointer issue in fixup.
Fixes: 1b1b4dede457 ("arm64: Avoid premature usercopy failure") Signed-off-by: Tong Tiangen tongtiangen@huawei.com Tested-by: yongqiang Liu liuyongqiang13@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Yongqiang Liu liuyongqiang13@huawei.com --- arch/arm64/lib/copy_to_user.S | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/lib/copy_to_user.S b/arch/arm64/lib/copy_to_user.S index 84b7a16e82b5..6214e4972141 100644 --- a/arch/arm64/lib/copy_to_user.S +++ b/arch/arm64/lib/copy_to_user.S @@ -77,6 +77,7 @@ ENDPROC(__arch_copy_to_user) ENTRY(__arch_copy_to_user_generic_read) uaccess_enable_not_uao x3, x4, x5 add end, x0, x2 + mov srcin, x1 #include "copy_template_generic_read.S" uaccess_disable_not_uao x3, x4