Commit 28f6e487 authored by Zheng Zucheng's avatar Zheng Zucheng Committed by Zheng Zengkai
Browse files

fork: Fixed the extended kabi memory is not initialized

hulk inclusion
category: bugfix
bugzilla: 18808I3, https://gitee.com/openeuler/kernel/issues/I648XI


CVE: NA

-------------------------------

If the extended kabi memory is not initialized, maybe has security risks.
Therefore, the extended kabi memory is initialized to NULL in fork process
and initialized by users as required.

Fixes: 5efc447b ("fork: Allocate a new task_struct_resvd object for fork task")
Signed-off-by: default avatarZheng Zucheng <zhengzucheng@huawei.com>
Reviewed-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a3a6ee2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -856,7 +856,7 @@ void set_task_stack_end_magic(struct task_struct *tsk)
static bool dup_resvd_task_struct(struct task_struct *dst,
				  struct task_struct *orig, int node)
{
	dst->_resvd = kmalloc_node(sizeof(struct task_struct_resvd),
	dst->_resvd = kzalloc_node(sizeof(struct task_struct_resvd),
					  GFP_KERNEL, node);
	if (!dst->_resvd)
		return false;