Skip to content

Commit 28a6c6e

Browse files
perf/core: Fix potential NULL deref
jira VULN-6760 cve-bf CVE-2023-5717 commit-author Peter Zijlstra <[email protected]> commit a71ef31 Smatch is awesome. Fixes: 32671e3 ("perf: Disallow mis-matched inherited group reads") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> (cherry picked from commit a71ef31) Signed-off-by: Shreeya Patel <[email protected]>
1 parent 68b17ca commit 28a6c6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/events/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13143,7 +13143,8 @@ static int inherit_group(struct perf_event *parent_event,
1314313143
!perf_get_aux_event(child_ctr, leader))
1314413144
return -EINVAL;
1314513145
}
13146-
leader->group_generation = parent_event->group_generation;
13146+
if (leader)
13147+
leader->group_generation = parent_event->group_generation;
1314713148
return 0;
1314813149
}
1314913150

0 commit comments

Comments
 (0)