audk/NetworkPkg
Laszlo Ersek b8649cf2a3 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>
2021-06-09 17:25:03 +00:00
..
Application/VConfig NetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkg 2019-05-27 09:25:18 +08:00
ArpDxe NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559) 2020-02-21 03:01:57 +00:00
Dhcp4Dxe NetworkPkg/Dhcp4Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
Dhcp6Dxe NetworkPkg/Dhcp6Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DnsDxe NetworkPkg/DnsDxe: cosmetic fixups 2021-01-05 14:37:21 +00:00
DpcDxe NetworkPkg/DpcDxe: Fix few typos 2020-02-10 22:30:07 +00:00
HttpBootDxe NetworkPkg/DxeHttpLib: Migrate HTTP header manipulation APIs 2021-01-14 14:54:12 +00:00
HttpDxe NetworkPkg/HttpDxe: TlsChildHandle is not cleared when reset 2020-10-09 09:38:13 +00:00
HttpUtilitiesDxe NetworkPkg: Remove unnecessary MdeModulePkg/MdeModulePkg.dec dependency in INF 2019-10-08 09:20:34 +08:00
IScsiDxe NetworkPkg/IScsiDxe: check IScsiHexToBin() return values 2021-06-09 17:25:03 +00:00
Include NetworkPkg/DxeHttpLib: Migrate HTTP header manipulation APIs 2021-01-14 14:54:12 +00:00
Ip4Dxe NetworkPkg/Ip4Dxe: Check the received package length (CVE-2019-14559). 2020-02-19 10:13:42 +00:00
Ip6Dxe NetworkPkg/Ip6Dxe: Validate source data record length 2020-04-17 17:34:33 +00:00
Library DxeHttpIoLib: Http boot failure with no initializes timeout value. 2021-01-20 12:33:38 +00:00
MnpDxe NetworkPkg/MnpDxe: Fix various typos 2020-02-10 22:30:07 +00:00
Mtftp4Dxe NetworkPkg/Mtftp4Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
Mtftp6Dxe NetworkPkg/Mtftp6Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
SnpDxe NetworkPkg/SnpDxe: Prevent invalid PCI BAR access 2020-04-17 17:34:33 +00:00
TcpDxe NetworkPkg/TcpDxe/Tcp: Fix various typos 2020-02-10 22:30:07 +00:00
TlsAuthConfigDxe NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp() 2020-04-17 17:34:33 +00:00
TlsDxe NetworkPkg/Tls: Fix few typos 2020-02-10 22:30:07 +00:00
Udp4Dxe NetworkPkg/Udp4Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
Udp6Dxe NetworkPkg/Udp6Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
UefiPxeBcDxe NetworkPkg/UefiPxeBcDxe: handle competing DHCP servers (more) gracefully 2020-04-01 14:12:09 +00:00
VlanConfigDxe NetworkPkg/VlanConfigDxe: Fix few typos 2020-02-10 22:30:07 +00:00
WifiConnectionManagerDxe NetworkPkg: add missing newline at end of file 2019-10-04 11:18:22 +01:00
Network.dsc.inc NetworkPkg: Enable MD5 while enable iSCSI 2020-11-17 19:26:50 +00:00
Network.fdf.inc NetworkPkg: Add NETWORK_HTTP_ENABLE macro 2020-12-03 17:08:11 +00:00
NetworkBuildOptions.dsc.inc NetworkPkg: Enable MD5 while enable iSCSI 2020-11-17 19:26:50 +00:00
NetworkComponents.dsc.inc NetworkPkg: Add NETWORK_HTTP_ENABLE macro 2020-12-03 17:08:11 +00:00
NetworkDefines.dsc.inc NetworkPkg: Add NETWORK_HTTP_ENABLE macro 2020-12-03 17:08:11 +00:00
NetworkLibs.dsc.inc NetworkPkg: Add Http IO Helper Library to NetworkPkg 2020-12-04 11:45:07 +00:00
NetworkPcds.dsc.inc NetworkPkg: Add DSC/FDF include segment files to NetworkPkg. 2019-05-08 16:10:39 +08:00
NetworkPkg.ci.yaml NetworkPkg: Add NETWORK_HTTP_ENABLE macro 2020-12-03 17:08:11 +00:00
NetworkPkg.dec DxeHttpIoLib: Http boot failure with no initializes timeout value. 2021-01-20 12:33:38 +00:00
NetworkPkg.dsc NetworkPkg: Consume MdeLibs.dsc.inc for RegisterFilterLib 2021-03-31 05:47:10 +00:00
NetworkPkg.uni NetworkPkg/NetworkPkg.uni: Add missing strings for PCD 2019-12-04 05:05:57 +00:00
NetworkPkgExtra.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00