pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [pkgsrc-2024Q1] pkgsrc/sysutils
Module Name: pkgsrc
Committed By: bsiegert
Date: Fri Apr 5 18:52:48 UTC 2024
Modified Files:
pkgsrc/sysutils/xentools415 [pkgsrc-2024Q1]: Makefile distinfo
pkgsrc/sysutils/xentools418 [pkgsrc-2024Q1]: Makefile distinfo
Added Files:
pkgsrc/sysutils/xentools415/patches [pkgsrc-2024Q1]:
patch-xen_common_libelf_libelf-loader.c
pkgsrc/sysutils/xentools418/patches [pkgsrc-2024Q1]:
patch-xen_common_libelf_libelf-loader.c
Log Message:
Pullup ticket #6842 - requested by bouyer
sysutils/xentools415: NetBSD 10 bugfix
sysutils/xentools418: NetBSD 10 bugfix
Revisions pulled up:
- sysutils/xentools415/Makefile 1.30
- sysutils/xentools415/distinfo 1.15
- sysutils/xentools415/patches/patch-xen_common_libelf_libelf-loader.c 1.1
- sysutils/xentools418/Makefile 1.5
- sysutils/xentools418/distinfo 1.3
- sysutils/xentools418/patches/patch-xen_common_libelf_libelf-loader.c 1.1
---
Module Name: pkgsrc
Committed By: bouyer
Date: Tue Apr 2 22:01:24 UTC 2024
Modified Files:
pkgsrc/sysutils/xentools415: Makefile distinfo
pkgsrc/sysutils/xentools418: Makefile distinfo
Added Files:
pkgsrc/sysutils/xentools415/patches:
patch-xen_common_libelf_libelf-loader.c
pkgsrc/sysutils/xentools418/patches:
patch-xen_common_libelf_libelf-loader.c
Log Message:
xentools415, xentools418: fix bug in BSD symbol table support for i386:
When computing the size of the ELF symbol table, the code use
sizeof(Elf64_Shdr) or sizeof(Elf32_Shdr) depending on the kernel being
loaded. But later when computing offsets, the code uses
sizeof(struct elf_sym_header) which contains a union of both Shdr. This result
in an overflow of 64 bytes. Fortunably the code checks the size being copied
with the allocated size and silently ignores the copy if there isn't enough
space. Fortunably as well, the allocated size is rounded up to the next page
boundary, so most of the time there is enough space. Unfortunably, the official
i386 GENERIC kernel from the 10.0 release has the right size to trigger
this bug.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.4.1 pkgsrc/sysutils/xentools415/Makefile
cvs rdiff -u -r1.14 -r1.14.4.1 pkgsrc/sysutils/xentools415/distinfo
cvs rdiff -u -r0 -r1.1.2.2 \
pkgsrc/sysutils/xentools415/patches/patch-xen_common_libelf_libelf-loader.c
cvs rdiff -u -r1.4 -r1.4.2.1 pkgsrc/sysutils/xentools418/Makefile
cvs rdiff -u -r1.2 -r1.2.2.1 pkgsrc/sysutils/xentools418/distinfo
cvs rdiff -u -r0 -r1.1.2.2 \
pkgsrc/sysutils/xentools418/patches/patch-xen_common_libelf_libelf-loader.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/xentools415/Makefile
diff -u pkgsrc/sysutils/xentools415/Makefile:1.29 pkgsrc/sysutils/xentools415/Makefile:1.29.4.1
--- pkgsrc/sysutils/xentools415/Makefile:1.29 Mon Nov 20 21:23:03 2023
+++ pkgsrc/sysutils/xentools415/Makefile Fri Apr 5 18:52:47 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.29 2023/11/20 21:23:03 bouyer Exp $
+# $NetBSD: Makefile,v 1.29.4.1 2024/04/05 18:52:47 bsiegert Exp $
#
# VERSION is set in version.mk as it is shared with other packages
-PKGREVISION= 3
+PKGREVISION= 4
.include "version.mk"
PKGNAME= xentools415-${VERSION}
Index: pkgsrc/sysutils/xentools415/distinfo
diff -u pkgsrc/sysutils/xentools415/distinfo:1.14 pkgsrc/sysutils/xentools415/distinfo:1.14.4.1
--- pkgsrc/sysutils/xentools415/distinfo:1.14 Wed Nov 15 15:59:36 2023
+++ pkgsrc/sysutils/xentools415/distinfo Fri Apr 5 18:52:47 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2023/11/15 15:59:36 bouyer Exp $
+$NetBSD: distinfo,v 1.14.4.1 2024/04/05 18:52:47 bsiegert Exp $
BLAKE2s (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = 67ded947316100f4f66fa61fe156baf1620db575450f4dc0dd8dcb323e57970b
SHA512 (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = d888e0e653727ee9895fa866d8895e6d23a568b4e9e8439db4c4d790996700c60b0655e3a3129e599736ec2b4f7b987ce79d625ba208f06665fced8bddf94403
@@ -70,4 +70,5 @@ SHA1 (patch-tools_xl_Makefile) = 76f401d
SHA1 (patch-xen_Makefile) = fe7450f929aca11049c52c4fe53818441f1dc2ee
SHA1 (patch-xen_Rules.mk) = c743dc63f51fc280d529a7d9e08650292c171dac
SHA1 (patch-xen_arch_x86_Makefile) = 99db5e673e367f2a6c8c4fe776b3889cfb3372b1
+SHA1 (patch-xen_common_libelf_libelf-loader.c) = 1b3d9e315aa6c218e6eec1cb9b5536956d5c689c
SHA1 (patch-xen_include_Makefile) = 71987b559a344b098b97e5a7439232ceda198798
Index: pkgsrc/sysutils/xentools418/Makefile
diff -u pkgsrc/sysutils/xentools418/Makefile:1.4 pkgsrc/sysutils/xentools418/Makefile:1.4.2.1
--- pkgsrc/sysutils/xentools418/Makefile:1.4 Tue Jan 16 19:49:52 2024
+++ pkgsrc/sysutils/xentools418/Makefile Fri Apr 5 18:52:47 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2024/01/16 19:49:52 brook Exp $
+# $NetBSD: Makefile,v 1.4.2.1 2024/04/05 18:52:47 bsiegert Exp $
#
# VERSION is set in version.mk as it is shared with other packages
-#PKGREVISION= 1
+PKGREVISION= 1
.include "version.mk"
PKGNAME= xentools418-${VERSION:S/-//g}
Index: pkgsrc/sysutils/xentools418/distinfo
diff -u pkgsrc/sysutils/xentools418/distinfo:1.2 pkgsrc/sysutils/xentools418/distinfo:1.2.2.1
--- pkgsrc/sysutils/xentools418/distinfo:1.2 Sat Dec 30 18:52:38 2023
+++ pkgsrc/sysutils/xentools418/distinfo Fri Apr 5 18:52:47 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2023/12/30 18:52:38 gdt Exp $
+$NetBSD: distinfo,v 1.2.2.1 2024/04/05 18:52:47 bsiegert Exp $
BLAKE2s (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 82256e7e5d45980590a6493e17a4e133ff63fa28f00aff1963db96371e702448
SHA512 (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = e1c11e37f53aab0cc6a3ceaace0b8417f07009b1f20ff8572320895fef24f1a796ade041094a024eb24c988b9bed404c556a1fdde809bba89fb49f0e0ff45a57
@@ -63,4 +63,5 @@ SHA1 (patch-tools_qemu-xen_net_tap.c) =
SHA1 (patch-tools_xenpaging_xenpaging.c) = 3ade1afeb17210632ca350cdbb649f30d4697493
SHA1 (patch-tools_xl_Makefile) = 76f401d3f3dddb4fd48cf386494583db658e56b0
SHA1 (patch-xen_Makefile) = bba02be1c25c1a1cef44754602e073afc5de85eb
+SHA1 (patch-xen_common_libelf_libelf-loader.c) = 1b3d9e315aa6c218e6eec1cb9b5536956d5c689c
SHA1 (patch-xen_include_Makefile) = 5bdd9f7e3eda76285fff1f8aa9c32d2fa9e4a837
Added files:
Index: pkgsrc/sysutils/xentools415/patches/patch-xen_common_libelf_libelf-loader.c
diff -u /dev/null pkgsrc/sysutils/xentools415/patches/patch-xen_common_libelf_libelf-loader.c:1.1.2.2
--- /dev/null Fri Apr 5 18:52:48 2024
+++ pkgsrc/sysutils/xentools415/patches/patch-xen_common_libelf_libelf-loader.c Fri Apr 5 18:52:47 2024
@@ -0,0 +1,23 @@
+$NetBSD: patch-xen_common_libelf_libelf-loader.c,v 1.1.2.2 2024/04/05 18:52:47 bsiegert Exp $
+
+Compute total symbol table with the same size as used to build the
+symbol table.
+This bug only shows up with 32bit guest kernels, and if the end of the
+symbol table ends less than 64 bytes from a page boundary. When this
+happens the string table is not copied, and the guest sees all symbols with
+empty names.
+
+--- xen/common/libelf/libelf-loader.c.orig 2023-11-16 22:44:21.000000000 +0100
++++ xen/common/libelf/libelf-loader.c 2024-04-02 17:12:05.322638541 +0200
+@@ -204,10 +204,8 @@
+ sz = sizeof(uint32_t);
+
+ /* Space for the ELF header and section headers */
+- sz += offsetof(struct elf_sym_header, elf_header.section) +
+- ELF_BSDSYM_SECTIONS * (elf_64bit(elf) ? sizeof(Elf64_Shdr) :
+- sizeof(Elf32_Shdr));
++ sz += sizeof(struct elf_sym_header);
+ sz = elf_round_up(elf, sz);
+
+ /*
+ * No need to search for the symtab section header again, it's handler
Index: pkgsrc/sysutils/xentools418/patches/patch-xen_common_libelf_libelf-loader.c
diff -u /dev/null pkgsrc/sysutils/xentools418/patches/patch-xen_common_libelf_libelf-loader.c:1.1.2.2
--- /dev/null Fri Apr 5 18:52:48 2024
+++ pkgsrc/sysutils/xentools418/patches/patch-xen_common_libelf_libelf-loader.c Fri Apr 5 18:52:48 2024
@@ -0,0 +1,23 @@
+$NetBSD: patch-xen_common_libelf_libelf-loader.c,v 1.1.2.2 2024/04/05 18:52:48 bsiegert Exp $
+
+Compute total symbol table with the same size as used to build the
+symbol table.
+This bug only shows up with 32bit guest kernels, and if the end of the
+symbol table ends less than 64 bytes from a page boundary. When this
+happens the string table is not copied, and the guest sees all symbols with
+empty names.
+
+--- xen/common/libelf/libelf-loader.c.orig 2023-11-16 22:44:21.000000000 +0100
++++ xen/common/libelf/libelf-loader.c 2024-04-02 17:12:05.322638541 +0200
+@@ -204,10 +204,8 @@
+ sz = sizeof(uint32_t);
+
+ /* Space for the ELF header and section headers */
+- sz += offsetof(struct elf_sym_header, elf_header.section) +
+- ELF_BSDSYM_SECTIONS * (elf_64bit(elf) ? sizeof(Elf64_Shdr) :
+- sizeof(Elf32_Shdr));
++ sz += sizeof(struct elf_sym_header);
+ sz = elf_round_up(elf, sz);
+
+ /*
+ * No need to search for the symtab section header again, it's handler
Home |
Main Index |
Thread Index |
Old Index