e8f28b09e6
NetworkPkg/IScsiDxe: clean up library class dependencies
...
Sort the library class dependencies in the #include directives and in the
INF file. Remove the DpcLib class from the #include directives -- it is
not listed in the INF file, and IScsiDxe doesn't call either DpcLib API
(QueueDpc(), DispatchDpc()). No functional changes.
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-5-lersek@redhat.com >
2021-06-09 17:25:03 +00:00
95616b8661
NetworkPkg/IScsiDxe: clean up "ISCSI_CHAP_AUTH_DATA.OutChallengeLength"
...
The "ISCSI_CHAP_AUTH_DATA.OutChallenge" field is declared as a UINT8 array
with ISCSI_CHAP_AUTH_MAX_LEN (1024) elements. However, when the challenge
is generated and formatted, only ISCSI_CHAP_RSP_LEN (16) octets are used
in the array.
Change the array size to ISCSI_CHAP_RSP_LEN, and remove the (now unused)
ISCSI_CHAP_AUTH_MAX_LEN macro.
Remove the "ISCSI_CHAP_AUTH_DATA.OutChallengeLength" field, which is
superfluous too.
Most importantly, explain in a new comment *why* tying the challenge size
to the digest size (ISCSI_CHAP_RSP_LEN) has always made sense. (See also
Linux kernel commit 19f5f88ed779, "scsi: target: iscsi: tie the challenge
length to the hash digest size", 2019-11-06.) For sure, the motivation
that the new comment now explains has always been there, and has always
been the same, for IScsiDxe; it's just that now we spell it out too.
No change in peer-visible behavior.
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-4-lersek@redhat.com >
2021-06-09 17:25:03 +00:00
29cab43bb7
NetworkPkg/IScsiDxe: simplify "ISCSI_CHAP_AUTH_DATA.InChallenge" size
...
The ISCSI_CHAP_AUTH_MAX_LEN macro is defined with value 1024.
The usage of this macro currently involves a semantic (not functional)
bug, which we're going to fix in a subsequent patch, eliminating
ISCSI_CHAP_AUTH_MAX_LEN altogether.
For now, remove the macro's usage from all
"ISCSI_CHAP_AUTH_DATA.InChallenge" contexts. This is doable without
duplicating open-coded constants.
No changes in functionality.
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-3-lersek@redhat.com >
2021-06-09 17:25:03 +00:00
83761337ec
NetworkPkg/IScsiDxe: wrap IScsiCHAP source files to 80 characters
...
Working with overlong lines is difficult for me; rewrap the CHAP-related
source files in IScsiDxe to 80 characters width. No functional changes.
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: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20210608121259.32451-2-lersek@redhat.com >
2021-06-09 17:25:03 +00:00
d04b47962d
NetworkPkg: Consume MdeLibs.dsc.inc for RegisterFilterLib
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.
So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
2021-03-31 05:47:10 +00:00
ca272b9513
DxeHttpIoLib: Http boot failure with no initializes timeout value.
...
https://bugzilla.tianocore.org/show_bug.cgi?id=3170
Using PcdHttpIoTimeout to set default timeout value to HttpIoLib.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: GregX Yeh <gregx.yeh@intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2021-01-20 12:33:38 +00:00
40c4cd5421
NetworkPkg/DxeHttpLib: Migrate HTTP header manipulation APIs
...
Move HTTP header manipulation functions to DxeHttpLib from
HttpBootSupport.c. These general functions are used by both
Http BOOT and RedfishLib (patches will be sent later).
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Fan Wang <fan.wang@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Cc: Peter O'Hanley <peter.ohanley@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2021-01-14 14:54:12 +00:00
4ad1bd63b2
NetworkPkg/DnsDxe: cosmetic fixups
...
add whitespace according to coding style.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2021-01-05 14:37:21 +00:00
97e2b622d1
NetworkPkg/HttpBootDxe: Utilize HttpIoLib
...
Remove HTTP IO realted funcitons from HttpBootDxe
and use HttpIoLib instead.
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-12-04 11:45:07 +00:00
375e9b190e
NetworkPkg: Add Http IO Helper Library to NetworkPkg
...
This library provides HTTP IO helper functions.
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-12-04 11:45:07 +00:00
71a4041541
NetworkPkg/Library: Implementation of Http IO Helper Library
...
Add HTTP IO helper library which could be used by HTTP applications
such as HTTP Boot, Redfish HTTP REST EX driver instance and etc.
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-12-04 11:45:07 +00:00
126115a9fb
NetworkPkg: Add NETWORK_HTTP_ENABLE macro
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2917
Add NETWORK_HTTP_ENABLE macro and separate HttpDxe
and HttpUtilitiesDxe drivers from
HTTP_NETWORK_HTTP_BOOT_ENABLE macro.
Current NETWORK_HTTP_BOOT_ENABLE macro is defined to enable HTTP
boot feature in POST, this macro is not only enabling HTTP Boot
related modules but also enabling other generic HTTP modules
such as HttpDxe, HttpUtilitiesDxe and DnsDxe.
These HTTP base drivers would not be only used by HTTP boot
when we introduce the use case of Redfish implementation over
HTTP to edk2.
We should have a dedicate macro to enable generic HTTP functions
on Network stack and additionally provide NETWORK_HTTP_BOOT_ENABLE
for HTTP boot functionality for the use case that platform doesn't
require HTTP boot.
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Cc: Peter O'Hanley <peter.ohanley@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
2020-12-03 17:08:11 +00:00
4ecb1ba5ef
NetworkPkg/Defines: Make iSCSI disable as default
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3003
iSCSI is using the deprecated function MD5. It is
better to make the default setting secure. If the platforms
want to use the iSCSI, they should enable it in the platforms'
dsc file and be aware they are using an function with weak
cryptography.
Enable iSCSI in NetworkPkg.dsc for build.
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com >
Cc: Guomin Jiang <guomin.jiang@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Kelly Steele <kelly.steele@intel.com >
Cc: Zailiang Sun <zailiang.sun@intel.com >
Cc: Yi Qian <yi.qian@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Message-Id: <20201112055558.2348-13-zhichao.gao@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-11-17 19:26:50 +00:00
1aa2cf0521
NetworkPkg: Enable MD5 while enable iSCSI
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3003
There is a plan to make MD5 disable as default.
The new MACRO ENABLE_MD5_DEPRECATED_INTERFACES
would be introduced to enable MD5. Make the
definition ahead of the change to avoid build
error after the MACRO changed.
1. Add the NetworkBuildOptions.dsc.inc to define
the MACRO for build (support: GCC, INTEL, MSFT and
RVCT)
2. Add the BuildOption file to Network.dsc.inc
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Message-Id: <20201112055558.2348-5-zhichao.gao@intel.com >
[lersek@redhat.com: clean up comments in "NetworkBuildOptions.dsc.inc"]
[lersek@redhat.com: hoist "BuildOptions" above "Components" in
"Network.dsc.inc" for bug compat with edk2-platforms]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
2020-11-17 19:26:50 +00:00
70c2f10fde
NetworkPkg: Fix possible infinite loop in HTTP msg body parser
...
When an HTTP server sends a non-chunked body data with no
Content-Length header, the HttpParserMessageBody in DxeHttpLib
gets confused and never sets the Char pointer beyond the body start.
This causes "for" loop to never break because the condition of
"Char >= Body + BodyLength" is never satisfied.
Use BodyLength as the ContentLength for the parser when
ContentLength is absent in HTTP response headers.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2941
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-10-09 10:40:33 +00:00
5df413119e
NetworkPkg/HttpDxe: TlsChildHandle is not cleared when reset
...
BZ #2909 ,
https://bugzilla.tianocore.org/show_bug.cgi?id=2909
When Http->Configure() is invoked with HttpConfigData set to
NULL to reset the EFI HTTP instance, TLS child instance is
destroyed but HttpInstance->TlsChildHandle is not set to
NULL. After reconfiguring HTTP through Http->Configure()
and sending the HTTP request to HTTPS URL, TLS child
instance is not recreated because
HttpInstance->TlsChildHandle is not NULL.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Wu Jiaxin <jiaxin.wu@intel.com >
Cc: Fu Siyuan <siyuan.fu@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-10-09 09:38:13 +00:00
091ab12b34
NetworkPkg: Add RngLib entry to .dsc file.
...
Recent change to OpensslLib (b5701a4c7a
)
causes NetworkPkg build to fail due to lack of RngLib entry in
NetworkPkg's .dsc file.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
2020-10-09 09:01:45 +00:00
0716b2390f
NetworkPkg/NetworkPkg.ci.yaml: Add configuration for Ecc check
...
Add configuration ExceptionList and IgnoreFiles for package config
files. So users can rely on this to ignore some Ecc issues.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2020-08-17 03:28:09 +00:00
ce5855a8fa
NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
...
Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-07-31 02:49:51 +00:00
d3733188a2
NetworkPkg/DxeNetLib: Change the order of conditions in IF statement
...
The condition, NET_HEADSPACE(&(Nbuf->BlockOp[Index])) < Len, is
meaningless if Index = 0. So checking 'Index != 0' should be
performed first in the if statement.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
2020-05-20 12:44:43 +00:00
8293e6766a
NetworkPkg: Add RISCV64 architecture
...
Add RISCV64 Arch in NetworkPkg.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2672
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Co-authored-by: Gilbert Chen <gilbert.chen@hpe.com >
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Acked-by: Siyuan Fu <siyuan.fu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Leif Lindholm <leif.lindholm@linaro.org >
Cc: Gilbert Chen <gilbert.chen@hpe.com >
2020-05-07 03:17:15 +00:00
0f1946b662
NetworkPkg/IScsiDxe: Enhance the check for array boundary
...
Array 'TargetUrl' of size 255 may use index value(s) 255 and 256.
So enhance the boundary check to ensure the index is valid.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
2020-04-26 06:20:32 +00:00
ddfb0ab1bb
NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635
According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
alternatives to function keys. Configuration of drivers should be
accomplished via HII and via OS-present interfaces.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-04-17 17:34:33 +00:00
1c76101134
NetworkPkg/Ip6Dxe: Validate source data record length
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2273
Ip6ConfigReadConfigData() reads configuration data from a UEFI variable
and copies the data to another buffer. This change checks that the
length
of the data record being copied does not exceed the size of the source
UEFI variable data buffer.
If the size is exceeded, this change follows existing logic to treat the
variable as corrupted and deletes the variable so it will be set again.
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-04-17 17:34:33 +00:00
df4f154da9
NetworkPkg/SnpDxe: Prevent invalid PCI BAR access
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1563
SnpDxe initializes values for MemoryBarIndex and IoBarIndex to 0 and 1
respectively even if calls to PciIo->GetBarAttributes never return
success.
Later, if the BAR is used to perform IO/Mem reads/writes, a potentially
non-existent BAR index may be accessed. This change initializes the
values
to an invalid BAR index (PCI_MAX_BAR) so the condition can be explicitly
checked to avoid an invalid BAR access.
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-04-17 17:34:33 +00:00
ca08f3d453
NetworkPkg/SnpDxe: Register SnpNotifyExitBootServices at TPL_CALLBACK
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1562
The current SnpDxe implementation registers its ExitBootServices event
notification function (SnpNotifyExitBootServices ()) at TPL_NOTIFY. This
function calls PxeShutdown() which issues an UNDI shutdown operation.
Ultimately, this may invoke Shutdown() in EFI_SIMPLE_NETWORK_PROTOCOL.
The UEFI specification 2.8A Table 27 "TPL Restrictions" restricts the
TPL
for Simple Network Protocol to <= TPL_CALLBACK. In addition, it has been
observed in some 3rd party UNDI drivers to cause an issue further down
the call stack if the TPL is higher than TPL_CALLBACK on invocation.
Therefore, this commit changes the TPL of SnpNotifyExitBootServices() to
TPL_CALLBACK.
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-04-17 17:34:33 +00:00
9bb1f080c4
Revert "TlsAuthConfigDxe: fix TlsCaCertificate attributes retrieval"
...
This reverts commit 6896efdec2
.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2062
GetVariable() now returns attributes when it fails with
EFI_BUFFER_TOO_SMALL. Therefore, commit 6896efdec2
is
reverted since it is no longer relevant.
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
2020-04-07 13:51:24 +00:00
0a44fd3165
NetworkPkg/HttpBootDxe: Add RISC-V architecture for EDK2 CI.
...
Add RISC-V architecture for EDK2 CI testing.
BZ:2562:
https://bugzilla.tianocore.org/show_bug.cgi?id=2562
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Gilbert Chen <gilbert.chen@hpe.com >
Cc: Daniel Schaefer <daniel.schaefer@hpe.com >
2020-04-03 17:09:12 +00:00
8436d4de71
NetworkPkg: Add RISC-V architecture for EDK2 CI.
...
Add RISC-V architecture for EDK2 CI testing.
BZ:2562:
https://bugzilla.tianocore.org/show_bug.cgi?id=2562
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Gilbert Chen <gilbert.chen@hpe.com >
Cc: Daniel Schaefer <daniel.schaefer@hpe.com >
2020-04-03 17:09:12 +00:00
4deef2d865
NetworkPkg/Ip6Dxe: Fix ASSERT logic in Ip6ProcessRouterAdvertise()
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2655
This patch fixes reversed logic of recently added ASSERTs which should
ensure that Ip6IsNDOptionValid() implementation properly reacts to invalid
packets.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Fixes: 9c20342eed
2020-04-02 09:27:44 +00:00
3f55418d53
NetworkPkg/UefiPxeBcDxe: handle competing DHCP servers (more) gracefully
...
When DHCP is misconfigured on a network segment, such that two DHCP
servers attempt to reply to requests (and therefore race with each other),
the edk2 PXE client can confuse itself.
In PxeBcDhcp4BootInfo() / PxeBcDhcp6BootInfo(), the client may refer to a
DHCP reply packet as an "earlier" packet from the "same" DHCP server, when
in reality both packets are unrelated, and arrive from different DHCP
servers.
While the edk2 PXE client can do nothing to fix this, it should at least
not ASSERT() -- ASSERT() is for catching programming errors (violations of
invariants that are under the control of the programmer). ASSERT()s should
in particular not refer to external data (such as network packets). What's
more, in RELEASE builds, we get NULL pointer references.
Check the problem conditions with actual "if"s, and return
EFI_PROTOCOL_ERROR. This will trickle out to PxeBcLoadBootFile(), and be
reported as "PXE-E99: Unexpected network error".
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 >
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Message-Id: <20200331004749.16128-1-lersek@redhat.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
2020-04-01 14:12:09 +00:00
9c20342eed
NetworkPkg/Ip6Dxe: Improve Neightbor Discovery message validation.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2174
Problem has been identified with Ip6ProcessRouterAdvertise() when
Router Advertise packet contains options with malicious/invalid
'Length' field. This can lead to platform entering infinite loop
when processing options from that packet.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
2020-03-30 13:13:29 +00:00
1d3215fd24
NetworkPkg/ArpDxe: Recycle invalid ARP packets (CVE-2019-14559)
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2031
This patch triggers the RecycleEvent for invalid ARP packets.
Prior to this, we would just ignore invalid ARP packets,
and never free them.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Nicholas Armour <nicholas.armour@intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
2020-02-21 03:01:57 +00:00
578bcdc260
NetworkPkg/Ip4Dxe: Check the received package length (CVE-2019-14559).
...
v3: correct the coding style.
v2: correct the commit message & add BZ number.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1610
This patch is to check the received package length to make sure the package
has a valid length field.
Cc: Fu Siyuan <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com >
2020-02-19 10:13:42 +00:00
e79bf8d707
NetworkPkg/VlanConfigDxe: Fix few typos
...
Correctly write 'EFI_SUCCESS' in the documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-54-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
5add2c5577
NetworkPkg/UefiPxeBcDxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-53-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
ff82167537
NetworkPkg/Udp6Dxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-52-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
f7c4d22465
NetworkPkg/Udp4Dxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-51-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
dad13c8067
NetworkPkg/Tls: Fix few typos
...
Fix few typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-50-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
81c6f1762e
NetworkPkg/TcpDxe/Tcp: Fix various typos
...
Fix various typos in documentation, comments and debug strings.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-49-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
4cefb5e903
NetworkPkg/TcpDxe/Sock: Fix few typos
...
Fix few typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-48-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
bb3594e842
NetworkPkg/SnpDxe: Fix few typos
...
Fix few typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-47-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
f6c8bbbe92
NetworkPkg/Mtftp6Dxe: Fix various typos
...
Fix various typos in documentation, comments and strings.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-46-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
68ddad3f60
NetworkPkg/Mtftp4Dxe: Fix various typos
...
Fix various typos in documentation, comments and debug strings.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-45-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
5feb1fbd44
NetworkPkg/MnpDxe: Fix various typos
...
Fix various typos in documentation, comments and debug strings.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-44-philmd@redhat.com >
[lersek@redhat.com: replace EFI_D_xxx w/ DEBUG_xxx to shut up PatchCheck]
2020-02-10 22:30:07 +00:00
6deb4baa1f
NetworkPkg/Library: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-43-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
efb5659334
NetworkPkg/IScsiDxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-42-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
7de8045a09
NetworkPkg/Ip6Dxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-41-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
6c585b52e5
NetworkPkg/Ip4Dxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-40-philmd@redhat.com >
2020-02-10 22:30:07 +00:00
ba3b642d5b
NetworkPkg/HttpDxe: Fix various typos
...
Fix various typos in comments and documentation.
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Antoine Coeur <coeur@gmx.fr >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com >
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com >
Message-Id: <20200207010831.9046-39-philmd@redhat.com >
2020-02-10 22:30:07 +00:00