summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2021-06-08 14:12:59 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-09 17:25:03 +0000
commitb8649cf2a3e673a4a8cb6c255e394b354b771550 (patch)
treeb13058c3f709f2e201760b5cf278401ccac7997f /IntelFsp2Pkg
parent54e90edaed0d7c15230902ac4d74f4304bad2ebd (diff)
downloadedk2-b8649cf2a3e673a4a8cb6c255e394b354b771550.tar.gz
edk2-b8649cf2a3e673a4a8cb6c255e394b354b771550.tar.bz2
edk2-b8649cf2a3e673a4a8cb6c255e394b354b771550.zip
NetworkPkg/IScsiDxe: check IScsiHexToBin() return values
IScsiDxe (that is, the initiator) receives two hex-encoded strings from the iSCSI target: - CHAP_C, where the target challenges the initiator, - CHAP_R, where the target answers the challenge from the initiator (in case the initiator wants mutual authentication). Accordingly, we have two IScsiHexToBin() call sites: - At the CHAP_C decoding site, check whether the decoding succeeds. The decoded buffer ("AuthData->InChallenge") can accommodate 1024 bytes, which is a permissible restriction on the target, per <https://tools.ietf.org/html/rfc7143#section-12.1.3>. Shorter challenges from the target are acceptable. - At the CHAP_R decoding site, enforce that the decoding both succeed, and provide exactly ISCSI_CHAP_RSP_LEN bytes. CHAP_R contains the digest calculated by the target, therefore it must be of fixed size. We may only call IScsiCHAPAuthTarget() if "TargetRsp" has been fully populated. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3356 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Message-Id: <20210608121259.32451-11-lersek@redhat.com>
Diffstat (limited to 'IntelFsp2Pkg')
0 files changed, 0 insertions, 0 deletions