Unverified Commit ccaf3dad authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13166 CVE-2024-50133

Merge Pull Request from: @ci-robot 
 
PR sync from: Lin Yujun <linyujun809@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/Q2XFED2YJZHPWLVR3MDR7IZA5FXR2MSA/ 
Thomas Weißschuh (1):
  LoongArch: Don't crash in stack_top() for tasks without vDSO


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/IB2BWS 
 
Link:https://gitee.com/openeuler/kernel/pulls/13166

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parents c7ed40dd 5575f197
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ unsigned long stack_top(void)
{
	unsigned long top = TASK_SIZE & PAGE_MASK;

	if (current->thread.vdso) {
		/* Space for the VDSO & data page */
		top -= PAGE_ALIGN(current->thread.vdso->size);
		top -= PAGE_SIZE;
@@ -280,6 +281,7 @@ unsigned long stack_top(void)
		/* Space to randomize the VDSO base */
		if (current->flags & PF_RANDOMIZE)
			top -= VDSO_RANDOMIZE_SIZE;
	}

	return top;
}