From 1c7bd93570e9724831e0bab95f8283a35d7a6a38 Mon Sep 17 00:00:00 2001 From: sunh Date: Thu, 5 May 2022 11:12:58 +0800 Subject: [PATCH] fix-null-pointer-dereference-when-paring-ICMP6_ROUTE_ADVERTISE messages (cherry picked from commit ca2e356735821b85cdee855dae8a17ef633fc085) --- ...-dereference-when-paring-ICMP6_ROUTE.patch | 26 +++++++++++++++++++ grub.patches | 1 + grub2.spec | 8 +++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 backport-fix-null-pointer-dereference-when-paring-ICMP6_ROUTE.patch diff --git a/backport-fix-null-pointer-dereference-when-paring-ICMP6_ROUTE.patch b/backport-fix-null-pointer-dereference-when-paring-ICMP6_ROUTE.patch new file mode 100644 index 0000000..a83031c --- /dev/null +++ b/backport-fix-null-pointer-dereference-when-paring-ICMP6_ROUTE.patch @@ -0,0 +1,26 @@ +From 9d7f329418139b0604071aee333d621c960915ca Mon Sep 17 00:00:00 2001 +From: Qiumiao Zhang +Date: Thu, 5 May 2022 10:35:14 +0800 +Subject: [PATCH] fix null pointer dereference when paring + ICMP6_ROUTER_ADVERTISE messages + +--- + grub-core/net/icmp6.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c +index 56a3ec5..fb88961 100644 +--- a/grub-core/net/icmp6.c ++++ b/grub-core/net/icmp6.c +@@ -480,7 +480,7 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb, + + /* May not have gotten slaac info, find a global address on this + card. */ +- if (route_inf == NULL) ++ if (route_inf == NULL && orig_inf != NULL) + { + FOR_NET_NETWORK_LEVEL_INTERFACES (inf) + { +-- +2.23.0 + diff --git a/grub.patches b/grub.patches index 1653977..a5fd37a 100644 --- a/grub.patches +++ b/grub.patches @@ -207,3 +207,4 @@ Patch0207: backport-grub-core-loader-i386-efi-linux.c-do-not-validate-ke.patch Patch0208: backport-grub-core-loader-arm64-linux.c-do-not-validate-kerne.patch Patch0209: backport-grub-core-loader-efi-chainloader.c-do-not-validate-c.patch Patch0210: backport-grub-core-loader-efi-linux.c-drop-now-unused-grub_li.patch +Patch0211: backport-fix-null-pointer-dereference-when-paring-ICMP6_ROUTE.patch diff --git a/grub2.spec b/grub2.spec index 78bfdef..6d7742c 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,7 +14,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 7 +Release: 8 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -436,6 +436,12 @@ fi %{_datadir}/man/man* %changelog +* Thu May 05 2022 sunhai - 1:2.06-8 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix PXE boot in IPv6 network when paring ICMP6_ROUTE_ADVERTISE messages + * Sun Apr 24 2022 zhangqiumiao - 2.06-7 - Type:bugfix - CVE:NA -- Gitee