Repository navigation
Commit 57fc032
committed
perf session: Avoid infinite loop when seeing invalid header.size
Vince reported that when fuzzing the userland perf tool with a bogus
perf.data file he got into a infinite loop in 'perf report'.
Changing the return of fetch_mmaped_event() to ERR_PTR(-EINVAL) for that
case gets us out of that infinite loop.
Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190726211415.GE24867@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent 272172b commit 57fc032
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
1955 | 1956 | | |
1956 | 1957 | | |
1957 | 1958 | | |
1958 | | - | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
1959 | 1962 | | |
1960 | 1963 | | |
1961 | 1964 | | |
| |||
1973 | 1976 | | |
1974 | 1977 | | |
1975 | 1978 | | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
1976 | 1982 | | |
1977 | 1983 | | |
1978 | 1984 | | |
| |||
2072 | 2078 | | |
2073 | 2079 | | |
2074 | 2080 | | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
2075 | 2084 | | |
2076 | 2085 | | |
2077 | 2086 | | |
| |||
0 commit comments