[PATCH] net: fix null pointer dereference when parsing ICMP6_ROUTER_ADVERTISE messages

2022-02-17 Thread Qiumiao Zhang via Grub-devel
During UEFI PXE boot in IPv6 network, if the DHCP server adopts stateful automatic configuration, when the client receives the ICMP6_ROUTER_ADVERTISE message multicast from the server, it will cause the problem of dereference null pointer and cause the grub2 program to crash. Fixes bug: https://

[PATCH v2] net: fix null pointer dereference when parsing ICMP6_ROUTER_ADVERTISE messages

2022-04-15 Thread Qiumiao Zhang via Grub-devel
During UEFI PXE boot in IPv6 network, if the DHCP server adopts stateful automatic configuration, then the client receives a ICMP6_ROUTER_ADVERTISE multicast message from the server. This may be received without the interfaced having a configured network address, so orig_inf will be null, which can

[PATCH] efinet: skip virtual IPv4 and IPv6 devices with VLAN when enumerating cards

2024-08-14 Thread Qiumiao Zhang via Grub-devel
EDK2 PXE driver creates two child devices - IPv4 and IPv6 - with bound SNP instances. When VLAN is configured, VLAN device path nodes will be added to these two child devices. Example of device hierarchy is PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(525400123456,0x1) PciRoot(0x0)/Pci(0x2,0

[PATCH] util/grub-mkfont: Fix resource leaks

2022-08-01 Thread Qiumiao Zhang via Grub-devel
--- util/grub-mkfont.c | 5 + 1 file changed, 5 insertions(+) diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index f07566ade..0070edf19 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -699,6 +699,7 @@ add_font (struct grub_font_info *font_info, FT_Face face, int nocut)

[PATCH] util/grub-mkfont: use valid conversion specifications in printf and fprintf

2022-10-11 Thread Qiumiao Zhang via Grub-devel
For printf/fprintf functions, unsigned integers should use %u as the valid conversion specification instead of %d. Signed-off-by: Qiumiao Zhang --- util/grub-mkfont.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index 17eefe15

[PATCH] acpi: use xsdt_addr if present

2023-06-08 Thread Qiumiao Zhang via Grub-devel
According to the UEFI specification, in ACPI 2.0 or later, an ACPI-compatible OS must use the XSDT if present. So, we should use xsdt_addr instead of rsdt_addr if xsdt_addr is valid. Signed-off-by: Qiumiao Zhang --- grub-core/commands/acpi.c | 6 +- 1 file changed, 5 insertions(+), 1 deleti

[PATCH v2] commands/acpi: use xsdt_addr if present

2023-06-12 Thread Qiumiao Zhang via Grub-devel
According to the ACPI specification, in ACPI 2.0 or later, an ACPI-compatible OS must use the XSDT if present. So, we should use xsdt_addr instead of rsdt_addr if xsdt_addr is valid. Signed-off-by: Qiumiao Zhang --- Changes since v2: * update the commit message Qiumiao --- grub-core/commands/

[PATCH] kern/acpi: use xsdt_addr if present

2023-06-12 Thread Qiumiao Zhang via Grub-devel
According to the ACPI specification, in ACPI 2.0 or later, an ACPI-compatible OS must use the XSDT if present. So, we should use xsdt_addr instead of rsdt_addr if xsdt_addr is valid. Signed-off-by: Qiumiao Zhang --- grub-core/kern/acpi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 del

[PATCH] util/grub-mount: fix memory leak in fuse_getattr

2023-07-24 Thread Qiumiao Zhang via Grub-devel
Signed-off-by: Qiumiao Zhang --- util/grub-mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-mount.c b/util/grub-mount.c index 1c35b6a6e..c69889df9 100644 --- a/util/grub-mount.c +++ b/util/grub-mount.c @@ -198,6 +198,7 @@ fuse_getattr (const char *path, struct stat *st, (f

[PATCH] util/grub-mount: Check file path sanity

2023-10-24 Thread Qiumiao Zhang via Grub-devel
In grub-mount.c, the function argp_parser() lacks a check on the sanity of the file path when parsing parameters. This results in a segmentation fault if a partition is mounted to a non-existent path. Signed-off-by: Qiumiao Zhang --- util/grub-mount.c | 2 ++ 1 file changed, 2 insertions(+) dif

[PATCH] commands/acpi: Fix furthering address the tables based upon the Entry field of XSDT

2023-12-11 Thread Qiumiao Zhang via Grub-devel
According to the ACPI specification, the Entry field of XSDT containsts an array of 64-bit physical addresses that point to other DESCRIPTION_HEADERs. But entry_ptr is defined as a 32-bit pointer, which result in mistakenly treating each 64-bit length address as two 32-bit length addresses when ite

Re: [PATCH] efinet: Skip virtual VLAN devices during card enumeration

2024-10-23 Thread Qiumiao Zhang via Grub-devel
On Tue, Oct 22, 2024 at 10:04:25PM +0800, Daniel Kiper wrote: > On Fri, Oct 18, 2024 at 07:48:24PM +0800, Michael Chang wrote: > > On Fri, Oct 18, 2024 at 08:08:28AM GMT, zhangqiumiao wrote: > > > > On Thu, Oct 03, 2024 at 03:23:15PM +0800, Michael Chang via Grub-devel > > > > wrote: > > > >> Simi