Skip to content

Commit 83b75d7

Browse files
pvts-matPlaidCat
authored andcommitted
perf/core: Fix potential NULL deref
jira VULN-7623 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: Marcin Wcisło <[email protected]>
1 parent e8e4d75 commit 83b75d7

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
@@ -11031,7 +11031,8 @@ static int inherit_group(struct perf_event *parent_event,
1103111031
if (IS_ERR(child_ctr))
1103211032
return PTR_ERR(child_ctr);
1103311033
}
11034-
leader->group_generation = parent_event->group_generation;
11034+
if (leader)
11035+
leader->group_generation = parent_event->group_generation;
1103511036
return 0;
1103611037
}
1103711038

0 commit comments

Comments
 (0)