Skip to content

Commit fbc0370

Browse files
committed
perf/core: Fix potential NULL deref
jira VULN-4127 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 78f0eef commit fbc0370

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
@@ -13020,7 +13020,8 @@ static int inherit_group(struct perf_event *parent_event,
1302013020
!perf_get_aux_event(child_ctr, leader))
1302113021
return -EINVAL;
1302213022
}
13023-
leader->group_generation = parent_event->group_generation;
13023+
if (leader)
13024+
leader->group_generation = parent_event->group_generation;
1302413025
return 0;
1302513026
}
1302613027

0 commit comments

Comments
 (0)