diff options
| author | Gen Zhang <[email protected]> | 2019-05-30 09:10:30 +0800 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2019-06-18 19:46:23 -0400 |
| commit | f9e3ebeea4521652318af903cddeaf033527e93e (patch) | |
| tree | 240b07f85bfba3b55f1ef69129cdb74a10fbb49f /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
| parent | 821744403913d957cb52263b2016fd5bd29c30d0 (diff) | |
scsi: mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main()
In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from
userspace. 'ioctl_header.ioc_number' is then checked. The legal result is
saved to 'ioc'. Then, in condition MPT3COMMAND, the whole struct is fetched
again from the userspace. Then _ctl_do_mpt_command() is called, 'ioc' and
'karg' as inputs.
However, a malicious user can change the 'ioc_number' between the two
fetches, which will cause a potential security issues. Moreover, a
malicious user can provide a valid 'ioc_number' to pass the check in first
fetch, and then modify it in the second fetch.
To fix this, we need to recheck the 'ioc_number' in the second fetch.
Signed-off-by: Gen Zhang <[email protected]>
Acked-by: Suganath Prabu S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions