
From: Zheng Zucheng <zhengzucheng@huawei.com> 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: 5efc447b7caf ("fork: Allocate a new task_struct_resvd object for fork task") Signed-off-by: Zheng Zucheng <zhengzucheng@huawei.com> Reviewed-by: Zhang Qiao <zhangqiao22@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> --- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/fork.c b/kernel/fork.c index 72d2834cc4fd..0ac2ae1e8f85 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -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; -- 2.20.1