Skip to content

Commit df61ae5

Browse files
perf/core: Fix potential NULL deref
jira VULN-6760 cve-bf CVE-2023-5717 commit-author Peter Zijlstra <peterz@infradead.org> commit a71ef31 Smatch is awesome. Fixes: 32671e3 ("perf: Disallow mis-matched inherited group reads") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> (cherry picked from commit a71ef31) Signed-off-by: Shreeya Patel <spatel@ciq.com>
1 parent d3efb98 commit df61ae5

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)