aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorVegard Nossum <[email protected]>2014-02-16 22:24:17 +0100
committerThomas Gleixner <[email protected]>2014-02-21 21:27:10 +0100
commit4efbc454ba68def5ef285b26ebfcfdb605b52755 (patch)
tree96fd992414451a19797a38476afed61b352d3d4f /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent3cf1962cdbf6b3a9e3ef21116d215bbab350ea37 (diff)
sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually have on the stack (attr->size defaults to the size of the struct) and leaves the rest of the userspace-provided buffer untouched. Found using kmemcheck + trinity. Fixes: d50dde5a10f30 ("sched: Add new scheduler syscalls to support an extended scheduling parameters ABI") Cc: Dario Faggioli <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions