Skip to content

Commit b5a9628

Browse files
perf/core: Fix potential NULL deref
jira VULN-8890 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 9e13e56 commit b5a9628

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
@@ -13031,7 +13031,8 @@ static int inherit_group(struct perf_event *parent_event,
1303113031
!perf_get_aux_event(child_ctr, leader))
1303213032
return -EINVAL;
1303313033
}
13034-
leader->group_generation = parent_event->group_generation;
13034+
if (leader)
13035+
leader->group_generation = parent_event->group_generation;
1303513036
return 0;
1303613037
}
1303713038

0 commit comments

Comments
 (0)