summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJiale Yao <yaojiale02@163.com>2026-10-29 13:29:48 +0800
committerMadhavan Srinivasan <maddy@linux.ibm.com>2026-11-10 16:53:56 +0530
commitf294ebd827e7a2b831b1eef4aaf437f07b2c235e (patch)
tree01e1ead8564522be261e1257b0d5fbca9362bdc4 /tools/perf/scripts/python
parent7475ea8b58616b33c04afb976cf0fbaad9dd63fb (diff)
powerpc/eeh: NUL-terminate force recovery input
eeh_force_recover_write() can fill its entire stack buffer from userspace and then pass the unterminated data to strncmp() and sscanf(). This can make the string helpers read beyond the buffer. Reserve the last byte and initialize the buffer so every accepted input is NUL-terminated. Propagate copy errors before parsing as well. Fixes: 954bd99435b8 ("powerpc/eeh: Add eeh_force_recover to debugfs") Cc: stable@vger.kernel.org Signed-off-by: Jiale Yao <yaojiale02@163.com> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20261029052948.2525048-1-yaojiale02@163.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions