Bug 4756 - invalid address access in lookup_rec() when index is 0
Summary: invalid address access in lookup_rec() when index is 0
Status: NEW
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: 4.19-028.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: maqiao
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-12 16:58 UTC by inspursand
Modified: 2023-04-12 16:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description inspursand inspur_group 2023-04-12 16:58:03 UTC
Description of problem:

When checking pg->records[pg->index - 1].ip in lookup_rec(), it can get a
    pg which is newly added to ftrace_pages_start in ftrace_process_locs().
    Before the first pg->index++, index is 0 and accessing pg->records[-1].ip
    will cause this problem.

Version-Release number of selected component (if applicable):

4.19

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info: