aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/task-analyzer-record
diff options
context:
space:
mode:
authorLin Ma <[email protected]>2023-07-23 16:00:53 +0800
committerMartin K. Petersen <[email protected]>2023-07-25 21:51:04 -0400
commit47cd3770e31df942e2bb925a9a855c79ed0662eb (patch)
tree13d567513c9608f5eb9687316bbdbbd2aedc51a3 /tools/perf/scripts/python/bin/task-analyzer-record
parentee0268f230f66cb472df3424f380ea668da2749a (diff)
scsi: qla4xxx: Add length check when parsing nlattrs
There are three places that qla4xxx parses nlattrs: - qla4xxx_set_chap_entry() - qla4xxx_iface_set_param() - qla4xxx_sysfs_ddb_set_param() and each of them directly converts the nlattr to specific pointer of structure without length checking. This could be dangerous as those attributes are not validated and a malformed nlattr (e.g., length 0) could result in an OOB read that leaks heap dirty data. Add the nla_len check before accessing the nlattr data and return EINVAL if the length check fails. Fixes: 26ffd7b45fe9 ("[SCSI] qla4xxx: Add support to set CHAP entries") Fixes: 1e9e2be3ee03 ("[SCSI] qla4xxx: Add flash node mgmt support") Fixes: 00c31889f751 ("[SCSI] qla4xxx: fix data alignment and use nl helpers") Signed-off-by: Lin Ma <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chris Leech <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/task-analyzer-record')
0 files changed, 0 insertions, 0 deletions