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.diff -r1.29 -r1.29.4.1 pkgsrc/sysutils/xentools415/Makefile
(bsiegert)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.29 2023/11/20 21:23:03 bouyer Exp $ | 1 | # $NetBSD: Makefile,v 1.29.4.1 2024/04/05 18:52:47 bsiegert Exp $ | |
2 | # | 2 | # | |
3 | # VERSION is set in version.mk as it is shared with other packages | 3 | # VERSION is set in version.mk as it is shared with other packages | |
4 | PKGREVISION= 3 | 4 | PKGREVISION= 4 | |
5 | .include "version.mk" | 5 | .include "version.mk" | |
6 | PKGNAME= xentools415-${VERSION} | 6 | PKGNAME= xentools415-${VERSION} | |
7 | 7 | |||
8 | CATEGORIES= sysutils | 8 | CATEGORIES= sysutils | |
9 | 9 | |||
10 | MAINTAINER= bouyer@NetBSD.org | 10 | MAINTAINER= bouyer@NetBSD.org | |
11 | HOMEPAGE= https://xenproject.org/ | 11 | HOMEPAGE= https://xenproject.org/ | |
12 | COMMENT= Userland Tools for Xen 4.15.x | 12 | COMMENT= Userland Tools for Xen 4.15.x | |
13 | LICENSE= gnu-gpl-v2 | 13 | LICENSE= gnu-gpl-v2 | |
14 | 14 | |||
15 | # XXX add version check: Xen requires dev86 >= 0.16.14 | 15 | # XXX add version check: Xen requires dev86 >= 0.16.14 | |
16 | TOOL_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware | 16 | TOOL_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware | |
17 | .if !exists(/usr/bin/iasl) | 17 | .if !exists(/usr/bin/iasl) |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.14 2023/11/15 15:59:36 bouyer Exp $ | 1 | $NetBSD: distinfo,v 1.14.4.1 2024/04/05 18:52:47 bsiegert Exp $ | |
2 | 2 | |||
3 | BLAKE2s (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = 67ded947316100f4f66fa61fe156baf1620db575450f4dc0dd8dcb323e57970b | 3 | BLAKE2s (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = 67ded947316100f4f66fa61fe156baf1620db575450f4dc0dd8dcb323e57970b | |
4 | SHA512 (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = d888e0e653727ee9895fa866d8895e6d23a568b4e9e8439db4c4d790996700c60b0655e3a3129e599736ec2b4f7b987ce79d625ba208f06665fced8bddf94403 | 4 | SHA512 (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = d888e0e653727ee9895fa866d8895e6d23a568b4e9e8439db4c4d790996700c60b0655e3a3129e599736ec2b4f7b987ce79d625ba208f06665fced8bddf94403 | |
5 | Size (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = 3937560 bytes | 5 | Size (xen415/ipxe-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz) = 3937560 bytes | |
6 | BLAKE2s (xen415/seabios-1.16.0.tar.gz) = 490e358ef7788a08d928e0f599cbafa2b6a5182003ff3dee8ede8252983a92b6 | 6 | BLAKE2s (xen415/seabios-1.16.0.tar.gz) = 490e358ef7788a08d928e0f599cbafa2b6a5182003ff3dee8ede8252983a92b6 | |
7 | SHA512 (xen415/seabios-1.16.0.tar.gz) = bc4a674ff62b84d5643814c46f965c39e417d91610ea95503496cb9d6942075e71f256e5e354cd795cc618714d973203e06f1f32a0b479f1ee045175d9d74c39 | 7 | SHA512 (xen415/seabios-1.16.0.tar.gz) = bc4a674ff62b84d5643814c46f965c39e417d91610ea95503496cb9d6942075e71f256e5e354cd795cc618714d973203e06f1f32a0b479f1ee045175d9d74c39 | |
8 | Size (xen415/seabios-1.16.0.tar.gz) = 635418 bytes | 8 | Size (xen415/seabios-1.16.0.tar.gz) = 635418 bytes | |
9 | BLAKE2s (xen415/xen-4.15.5.tar.gz) = 85bef27c99fd9fd3037ec6df5e514289b650f2f073bcc543d13d5997c03332d4 | 9 | BLAKE2s (xen415/xen-4.15.5.tar.gz) = 85bef27c99fd9fd3037ec6df5e514289b650f2f073bcc543d13d5997c03332d4 | |
10 | SHA512 (xen415/xen-4.15.5.tar.gz) = 790f3d75df78f63f5b2ce3b99c1f2287f75ef5571d1b7a9bb9bac470bd28ccbd4816d07a1af8320eee4107626c75be029bd6dad1d99d58f3816906ed98d206d9 | 10 | SHA512 (xen415/xen-4.15.5.tar.gz) = 790f3d75df78f63f5b2ce3b99c1f2287f75ef5571d1b7a9bb9bac470bd28ccbd4816d07a1af8320eee4107626c75be029bd6dad1d99d58f3816906ed98d206d9 | |
11 | Size (xen415/xen-4.15.5.tar.gz) = 40835793 bytes | 11 | Size (xen415/xen-4.15.5.tar.gz) = 40835793 bytes | |
12 | SHA1 (patch-.._seabios-rel-1.16.0_src_string.c) = e82f2f16a236a3b878c07b4fb655998591717a73 | 12 | SHA1 (patch-.._seabios-rel-1.16.0_src_string.c) = e82f2f16a236a3b878c07b4fb655998591717a73 | |
13 | SHA1 (patch-Config.mk) = d108a1743b5b5313d3ea957b02a005b49f5b3bf6 | 13 | SHA1 (patch-Config.mk) = d108a1743b5b5313d3ea957b02a005b49f5b3bf6 | |
14 | SHA1 (patch-Makefile) = 6c580cbea532d08a38cf5e54228bd0210a98da21 | 14 | SHA1 (patch-Makefile) = 6c580cbea532d08a38cf5e54228bd0210a98da21 | |
@@ -60,14 +60,15 @@ SHA1 (patch-tools_qemu-xen-traditional_h | @@ -60,14 +60,15 @@ SHA1 (patch-tools_qemu-xen-traditional_h | |||
60 | SHA1 (patch-tools_qemu-xen-traditional_i386-dm_hookstarget.mak) = 3fdfbb7c9c2243a4cf5dabc5a6dd13c12f9d5850 | 60 | SHA1 (patch-tools_qemu-xen-traditional_i386-dm_hookstarget.mak) = 3fdfbb7c9c2243a4cf5dabc5a6dd13c12f9d5850 | |
61 | SHA1 (patch-tools_qemu-xen-traditional_net.c) = 17ca8b0ba8fca5eee277fc97373287aaf25b5dae | 61 | SHA1 (patch-tools_qemu-xen-traditional_net.c) = 17ca8b0ba8fca5eee277fc97373287aaf25b5dae | |
62 | SHA1 (patch-tools_qemu-xen-traditional_xen-hooks.mak) = bc59cb87742036dfa75869572b21b58dd5a2c5ee | 62 | SHA1 (patch-tools_qemu-xen-traditional_xen-hooks.mak) = bc59cb87742036dfa75869572b21b58dd5a2c5ee | |
63 | SHA1 (patch-tools_qemu-xen_audio_audio.c) = a1c33d8df7a15515592d5978412d02683847cce5 | 63 | SHA1 (patch-tools_qemu-xen_audio_audio.c) = a1c33d8df7a15515592d5978412d02683847cce5 | |
64 | SHA1 (patch-tools_qemu-xen_configure) = dc939ff397e5cd554b30d0cc9c19876470a5c2c3 | 64 | SHA1 (patch-tools_qemu-xen_configure) = dc939ff397e5cd554b30d0cc9c19876470a5c2c3 | |
65 | SHA1 (patch-tools_qemu-xen_net_tap-bsd.c) = ac1ed72daeb051eae7352542630a9a02c99e485e | 65 | SHA1 (patch-tools_qemu-xen_net_tap-bsd.c) = ac1ed72daeb051eae7352542630a9a02c99e485e | |
66 | SHA1 (patch-tools_qemu-xen_net_tap.c) = 53d8c1799136c412b775d7d02d72b1abc63f4dd3 | 66 | SHA1 (patch-tools_qemu-xen_net_tap.c) = 53d8c1799136c412b775d7d02d72b1abc63f4dd3 | |
67 | SHA1 (patch-tools_xenpaging_xenpaging.c) = 3ade1afeb17210632ca350cdbb649f30d4697493 | 67 | SHA1 (patch-tools_xenpaging_xenpaging.c) = 3ade1afeb17210632ca350cdbb649f30d4697493 | |
68 | SHA1 (patch-tools_xenstore_xs_lib.c) = e3a8f6e3b149c3ab0f4ec8dcfa455983f94e6c16 | 68 | SHA1 (patch-tools_xenstore_xs_lib.c) = e3a8f6e3b149c3ab0f4ec8dcfa455983f94e6c16 | |
69 | SHA1 (patch-tools_xl_Makefile) = 76f401d3f3dddb4fd48cf386494583db658e56b0 | 69 | SHA1 (patch-tools_xl_Makefile) = 76f401d3f3dddb4fd48cf386494583db658e56b0 | |
70 | SHA1 (patch-xen_Makefile) = fe7450f929aca11049c52c4fe53818441f1dc2ee | 70 | SHA1 (patch-xen_Makefile) = fe7450f929aca11049c52c4fe53818441f1dc2ee | |
71 | SHA1 (patch-xen_Rules.mk) = c743dc63f51fc280d529a7d9e08650292c171dac | 71 | SHA1 (patch-xen_Rules.mk) = c743dc63f51fc280d529a7d9e08650292c171dac | |
72 | SHA1 (patch-xen_arch_x86_Makefile) = 99db5e673e367f2a6c8c4fe776b3889cfb3372b1 | 72 | SHA1 (patch-xen_arch_x86_Makefile) = 99db5e673e367f2a6c8c4fe776b3889cfb3372b1 | |
73 | SHA1 (patch-xen_common_libelf_libelf-loader.c) = 1b3d9e315aa6c218e6eec1cb9b5536956d5c689c | |||
73 | SHA1 (patch-xen_include_Makefile) = 71987b559a344b098b97e5a7439232ceda198798 | 74 | SHA1 (patch-xen_include_Makefile) = 71987b559a344b098b97e5a7439232ceda198798 |
$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
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.4 2024/01/16 19:49:52 brook Exp $ | 1 | # $NetBSD: Makefile,v 1.4.2.1 2024/04/05 18:52:47 bsiegert Exp $ | |
2 | # | 2 | # | |
3 | # VERSION is set in version.mk as it is shared with other packages | 3 | # VERSION is set in version.mk as it is shared with other packages | |
4 | #PKGREVISION= 1 | 4 | PKGREVISION= 1 | |
5 | .include "version.mk" | 5 | .include "version.mk" | |
6 | PKGNAME= xentools418-${VERSION:S/-//g} | 6 | PKGNAME= xentools418-${VERSION:S/-//g} | |
7 | 7 | |||
8 | CATEGORIES= sysutils | 8 | CATEGORIES= sysutils | |
9 | 9 | |||
10 | MAINTAINER= bouyer@NetBSD.org | 10 | MAINTAINER= bouyer@NetBSD.org | |
11 | HOMEPAGE= https://xenproject.org/ | 11 | HOMEPAGE= https://xenproject.org/ | |
12 | COMMENT= Userland Tools for Xen 4.18.x | 12 | COMMENT= Userland Tools for Xen 4.18.x | |
13 | LICENSE= gnu-gpl-v2 | 13 | LICENSE= gnu-gpl-v2 | |
14 | 14 | |||
15 | # XXX add version check: Xen requires dev86 >= 0.16.14 | 15 | # XXX add version check: Xen requires dev86 >= 0.16.14 | |
16 | TOOL_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware | 16 | TOOL_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware | |
17 | .if !exists(/usr/bin/iasl) | 17 | .if !exists(/usr/bin/iasl) |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.2 2023/12/30 18:52:38 gdt Exp $ | 1 | $NetBSD: distinfo,v 1.2.2.1 2024/04/05 18:52:47 bsiegert Exp $ | |
2 | 2 | |||
3 | BLAKE2s (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 82256e7e5d45980590a6493e17a4e133ff63fa28f00aff1963db96371e702448 | 3 | BLAKE2s (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 82256e7e5d45980590a6493e17a4e133ff63fa28f00aff1963db96371e702448 | |
4 | SHA512 (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = e1c11e37f53aab0cc6a3ceaace0b8417f07009b1f20ff8572320895fef24f1a796ade041094a024eb24c988b9bed404c556a1fdde809bba89fb49f0e0ff45a57 | 4 | SHA512 (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = e1c11e37f53aab0cc6a3ceaace0b8417f07009b1f20ff8572320895fef24f1a796ade041094a024eb24c988b9bed404c556a1fdde809bba89fb49f0e0ff45a57 | |
5 | Size (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 4079541 bytes | 5 | Size (xen418/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 4079541 bytes | |
6 | BLAKE2s (xen418/qemu-xen-20231116.tar.gz) = eee3ef6342ba518e00724a81b5ab1c20f05147c72a4dd2d99de4656e8ee91024 | 6 | BLAKE2s (xen418/qemu-xen-20231116.tar.gz) = eee3ef6342ba518e00724a81b5ab1c20f05147c72a4dd2d99de4656e8ee91024 | |
7 | SHA512 (xen418/qemu-xen-20231116.tar.gz) = a7bc24adc0bb70a0b518cd0e85766bcf15ad740986e097818cf0e4894e0ae85dfe02467dd8f505cbf6ad6ed02bc302258cc21a9dc765b4f7330e6505a50aa2f8 | 7 | SHA512 (xen418/qemu-xen-20231116.tar.gz) = a7bc24adc0bb70a0b518cd0e85766bcf15ad740986e097818cf0e4894e0ae85dfe02467dd8f505cbf6ad6ed02bc302258cc21a9dc765b4f7330e6505a50aa2f8 | |
8 | Size (xen418/qemu-xen-20231116.tar.gz) = 40718645 bytes | 8 | Size (xen418/qemu-xen-20231116.tar.gz) = 40718645 bytes | |
9 | BLAKE2s (xen418/qemu-xen-traditional-3d273dd.tar.gz) = 451316ac6d33cd349aa4eb06e56b5c05685b533867b9729a2749e18d7049060d | 9 | BLAKE2s (xen418/qemu-xen-traditional-3d273dd.tar.gz) = 451316ac6d33cd349aa4eb06e56b5c05685b533867b9729a2749e18d7049060d | |
10 | SHA512 (xen418/qemu-xen-traditional-3d273dd.tar.gz) = 46a3d7054f8ccd211a9c984385bf33ed763247b94626eb09f962086307dbc7e2d058942c16622e09ae782a7e7ea357524b29ea410ac53a70b9fa26b60e8a37ef | 10 | SHA512 (xen418/qemu-xen-traditional-3d273dd.tar.gz) = 46a3d7054f8ccd211a9c984385bf33ed763247b94626eb09f962086307dbc7e2d058942c16622e09ae782a7e7ea357524b29ea410ac53a70b9fa26b60e8a37ef | |
11 | Size (xen418/qemu-xen-traditional-3d273dd.tar.gz) = 3733225 bytes | 11 | Size (xen418/qemu-xen-traditional-3d273dd.tar.gz) = 3733225 bytes | |
12 | BLAKE2s (xen418/seabios-1.16.2.tar.gz) = 5c61373b373fe039436fb73e6459ce48c1b18a11cd48df157ebffa3e91001cef | 12 | BLAKE2s (xen418/seabios-1.16.2.tar.gz) = 5c61373b373fe039436fb73e6459ce48c1b18a11cd48df157ebffa3e91001cef | |
13 | SHA512 (xen418/seabios-1.16.2.tar.gz) = 4e6ede3cc614617e57f1a288e105e09d84aeaa47e53b03a20ba75124a4fac18f68ba0665c5661f7bfb75b57623866e2d0faf6da8270890b4da2cf7e0e8d1f534 | 13 | SHA512 (xen418/seabios-1.16.2.tar.gz) = 4e6ede3cc614617e57f1a288e105e09d84aeaa47e53b03a20ba75124a4fac18f68ba0665c5661f7bfb75b57623866e2d0faf6da8270890b4da2cf7e0e8d1f534 | |
14 | Size (xen418/seabios-1.16.2.tar.gz) = 635922 bytes | 14 | Size (xen418/seabios-1.16.2.tar.gz) = 635922 bytes | |
@@ -53,14 +53,15 @@ SHA1 (patch-tools_qemu-xen-traditional_h | @@ -53,14 +53,15 @@ SHA1 (patch-tools_qemu-xen-traditional_h | |||
53 | SHA1 (patch-tools_qemu-xen-traditional_hw_pt-msi.c) = a953380dbc3e64528c39e26d2c45c0cbd3e4d738 | 53 | SHA1 (patch-tools_qemu-xen-traditional_hw_pt-msi.c) = a953380dbc3e64528c39e26d2c45c0cbd3e4d738 | |
54 | SHA1 (patch-tools_qemu-xen-traditional_hw_pt-msi.h) = 787447cc24518fe5ae16942d72d3038db612419d | 54 | SHA1 (patch-tools_qemu-xen-traditional_hw_pt-msi.h) = 787447cc24518fe5ae16942d72d3038db612419d | |
55 | SHA1 (patch-tools_qemu-xen-traditional_i386-dm_hookstarget.mak) = 3fdfbb7c9c2243a4cf5dabc5a6dd13c12f9d5850 | 55 | SHA1 (patch-tools_qemu-xen-traditional_i386-dm_hookstarget.mak) = 3fdfbb7c9c2243a4cf5dabc5a6dd13c12f9d5850 | |
56 | SHA1 (patch-tools_qemu-xen-traditional_net.c) = 17ca8b0ba8fca5eee277fc97373287aaf25b5dae | 56 | SHA1 (patch-tools_qemu-xen-traditional_net.c) = 17ca8b0ba8fca5eee277fc97373287aaf25b5dae | |
57 | SHA1 (patch-tools_qemu-xen-traditional_xen-hooks.mak) = bc59cb87742036dfa75869572b21b58dd5a2c5ee | 57 | SHA1 (patch-tools_qemu-xen-traditional_xen-hooks.mak) = bc59cb87742036dfa75869572b21b58dd5a2c5ee | |
58 | SHA1 (patch-tools_qemu-xen_audio_audio.c) = d6a857ae398cb218d8ae4219f6b905bd8d7c0b0b | 58 | SHA1 (patch-tools_qemu-xen_audio_audio.c) = d6a857ae398cb218d8ae4219f6b905bd8d7c0b0b | |
59 | SHA1 (patch-tools_qemu-xen_bios_optionrom_Makefile) = b05db9e1fddbd8e02f8882c2a8d89889f4289b74 | 59 | SHA1 (patch-tools_qemu-xen_bios_optionrom_Makefile) = b05db9e1fddbd8e02f8882c2a8d89889f4289b74 | |
60 | SHA1 (patch-tools_qemu-xen_meson_mesonbuild_dependencies_ui.py) = 3e8f5ef12a16ce74dae76618837c7dad67d25f79 | 60 | SHA1 (patch-tools_qemu-xen_meson_mesonbuild_dependencies_ui.py) = 3e8f5ef12a16ce74dae76618837c7dad67d25f79 | |
61 | SHA1 (patch-tools_qemu-xen_net_tap-bsd.c) = 1d143fcc75ba21c78d7b44a191fd265c76a235e6 | 61 | SHA1 (patch-tools_qemu-xen_net_tap-bsd.c) = 1d143fcc75ba21c78d7b44a191fd265c76a235e6 | |
62 | SHA1 (patch-tools_qemu-xen_net_tap.c) = 8fdcbefcd38c15ddd65f6df62e0e410e325bae4e | 62 | SHA1 (patch-tools_qemu-xen_net_tap.c) = 8fdcbefcd38c15ddd65f6df62e0e410e325bae4e | |
63 | SHA1 (patch-tools_xenpaging_xenpaging.c) = 3ade1afeb17210632ca350cdbb649f30d4697493 | 63 | SHA1 (patch-tools_xenpaging_xenpaging.c) = 3ade1afeb17210632ca350cdbb649f30d4697493 | |
64 | SHA1 (patch-tools_xl_Makefile) = 76f401d3f3dddb4fd48cf386494583db658e56b0 | 64 | SHA1 (patch-tools_xl_Makefile) = 76f401d3f3dddb4fd48cf386494583db658e56b0 | |
65 | SHA1 (patch-xen_Makefile) = bba02be1c25c1a1cef44754602e073afc5de85eb | 65 | SHA1 (patch-xen_Makefile) = bba02be1c25c1a1cef44754602e073afc5de85eb | |
66 | SHA1 (patch-xen_common_libelf_libelf-loader.c) = 1b3d9e315aa6c218e6eec1cb9b5536956d5c689c | |||
66 | SHA1 (patch-xen_include_Makefile) = 5bdd9f7e3eda76285fff1f8aa9c32d2fa9e4a837 | 67 | SHA1 (patch-xen_include_Makefile) = 5bdd9f7e3eda76285fff1f8aa9c32d2fa9e4a837 |
$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