Commit 5e87833
committed
NetworkPkg:: SECURITY PATCH CVE 2023-45237
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4542
Bug Overview:
PixieFail Bug tianocore#9
CVE-2023-45237
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Use of a Weak PseudoRandom Number Generator
Change Overview:
Updates all Instances of NET_RANDOM (NetRandomInitSeed ()) to either
>
> EFI_STATUS
> EFIAPI
> PseudoRandomU32 (
> OUT UINT32 *Output
> );
>
or (depending on the use case)
>
> EFI_STATUS
> PseudoRandom (
> OUT VOID *Output,
> IN UINTN OutputLength
> );
>
This is because the use of
Example:
The following code snippet PseudoRandomU32 () function is used:
>
> UINT32 Random;
>
> Status = PseudoRandomU32 (&Random);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a failed to generate random number: %r\n",
__func__, Status));
> return Status;
> }
>
This also introduces a new PCD to enable/disable the use of the
NIST SP-800-90 approved algorithms for PseudoRandom () and
instead depend on the default implementation. This may be required for
some platforms where the UEFI Spec defined algorithms are not available.
>
> PcdEnforceSecureRngAlgorithms
>
If the platform does not have the NIST SP-800-90 approved algorithms
then the driver will assert.
Cc: Saloni Kasbekar <[email protected]>
Cc: Zachary Clark-williams <[email protected]>
Signed-off-by: Doug Flick [MSFT] <[email protected]>1 parent 86c8d69 commit 5e87833
File tree
26 files changed
+358
-83
lines changed- NetworkPkg
- Dhcp4Dxe
- Dhcp6Dxe
- DnsDxe
- HttpBootDxe
- IScsiDxe
- Include/Library
- Ip4Dxe
- Ip6Dxe
- Library/DxeNetLib
- TcpDxe
- Udp4Dxe
- Udp6Dxe
- UefiPxeBcDxe
26 files changed
+358
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| |||
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
206 | | - | |
| 213 | + | |
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
126 | 133 | | |
127 | 134 | | |
128 | 135 | | |
| |||
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
150 | | - | |
| 157 | + | |
151 | 158 | | |
152 | 159 | | |
153 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
295 | 302 | | |
296 | 303 | | |
297 | 304 | | |
| |||
467 | 474 | | |
468 | 475 | | |
469 | 476 | | |
470 | | - | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1963 | 1963 | | |
1964 | 1964 | | |
1965 | 1965 | | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
1966 | 1974 | | |
1967 | 1975 | | |
1968 | 1976 | | |
| |||
1977 | 1985 | | |
1978 | 1986 | | |
1979 | 1987 | | |
1980 | | - | |
| 1988 | + | |
1981 | 1989 | | |
1982 | 1990 | | |
1983 | 1991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
| 954 | + | |
954 | 955 | | |
955 | 956 | | |
956 | 957 | | |
| |||
961 | 962 | | |
962 | 963 | | |
963 | 964 | | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
964 | 971 | | |
965 | 972 | | |
966 | 973 | | |
| |||
976 | 983 | | |
977 | 984 | | |
978 | 985 | | |
979 | | - | |
| 986 | + | |
980 | 987 | | |
981 | 988 | | |
982 | 989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
580 | 584 | | |
581 | 585 | | |
582 | 586 | | |
583 | 587 | | |
584 | 588 | | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
589 | 597 | | |
590 | 598 | | |
591 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
477 | 480 | | |
478 | | - | |
| 481 | + | |
479 | 482 | | |
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
483 | 486 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 487 | + | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | | - | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
543 | | - | |
544 | 542 | | |
545 | 543 | | |
546 | 544 | | |
| |||
579 | 577 | | |
580 | 578 | | |
581 | 579 | | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
| 580 | + | |
| 581 | + | |
588 | 582 | | |
589 | | - | |
| 583 | + | |
590 | 584 | | |
591 | | - | |
592 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
593 | 588 | | |
594 | | - | |
595 | | - | |
| 589 | + | |
| 590 | + | |
596 | 591 | | |
597 | 592 | | |
598 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
555 | 556 | | |
556 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
557 | 564 | | |
558 | 565 | | |
559 | 566 | | |
| |||
653 | 660 | | |
654 | 661 | | |
655 | 662 | | |
656 | | - | |
| 663 | + | |
657 | 664 | | |
658 | 665 | | |
659 | 666 | | |
| |||
0 commit comments