Whamcloud - gitweb
LU-17000 mgs: check lcfg parameters 60/58360/7
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 11 Mar 2025 00:17:59 +0000 (18:17 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:02:49 +0000 (04:02 +0000)
commit5e4456e9dfeb9ef513ed26eb06ce9251888c991d
tree30b1e2956d0631f08a8763d92bd5bb191482d952
parentb968372d746012a868c742d75ac8062cc361a07a
LU-17000 mgs: check lcfg parameters

Check lcfg parameters in mgs_iocontrol() and mgs_iocontrol_pool().
Make the callers more consistent with buffer access and error checks.
REC_DATA_LEN() should be used instead of "rec_len" for lcfg size,
since "rec_len" is the full llog record size including hdr/tail.

CoverityID: 397130 ("Passing tainted expression lcfg->lcfg_buflens")
CoverityID: 397132 ("Passing tainted expression lcfg->lcfg_buflens")
CoverityID: 425252 ("Untrusted value as argument")

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9a7052a24d77124582df61340e520c1db6433892
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58360
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_cfg.h
lustre/mgs/mgs_handler.c
lustre/mgs/mgs_llog.c
lustre/obdclass/class_obd.c
lustre/obdclass/obd_config.c
lustre/ptlrpc/nodemap_handler.c
lustre/target/tgt_mount.c