diff options
author | Suren Baghdasaryan <[email protected]> | 2020-02-03 13:22:16 -0800 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2020-02-11 13:00:02 +0100 |
commit | 6fcca0fa48118e6d63733eb4644c6cd880c15b8f (patch) | |
tree | 115c2c04cbf09859e5e81c0c13aafe7959ffa617 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 52262ee567ad14c9606be25f3caddcefa3c514e4 (diff) |
sched/psi: Fix OOB write when writing 0 bytes to PSI files
Issuing write() with count parameter set to 0 on any file under
/proc/pressure/ will cause an OOB write because of the access to
buf[buf_size-1] when NUL-termination is performed. Fix this by checking
for buf_size to be non-zero.
Signed-off-by: Suren Baghdasaryan <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions