Compare commits

...

No commits in common. "c10s" and "c8" have entirely different histories.
c10s ... c8

23 changed files with 67 additions and 7051 deletions

4
.gitignore vendored
View File

@ -1,3 +1 @@
clog
syslinux-*.tar.*
*.rpm
SOURCES/syslinux-6.04-pre1.tar.xz

1
.syslinux.metadata Normal file
View File

@ -0,0 +1 @@
599b7a85d522b1b6658a1fe290e4d23dc64b1470 SOURCES/syslinux-6.04-pre1.tar.xz

View File

@ -1,61 +0,0 @@
From 321433861cc9cd3c7e0ee02830e561bc0f956998 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Sun, 4 Feb 2024 11:46:02 -0500
Subject: [PATCH] Fix build with GCC 14
com32/lib/syslinux/debug.c: In function syslinux_debug:
com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function printf
com32/libupload/upload_tftp.c: In function upload_tftp_write:
com32/libupload/upload_tftp.c:64:11: error: implicit declaration of function tftp_put
com32/chain/chain.c: In function main:
com32/chain/chain.c:517:44: error: passing argument 3 of loadfile from incompatible pointer type
com32/include/syslinux/loadfile.h:11:37: note: expected size_t * but argument is of type addr_t *
---
com32/chain/chain.c | 2 +-
com32/lib/syslinux/debug.c | 1 +
com32/libupload/tftp.h | 3 +++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/com32/chain/chain.c b/com32/chain/chain.c
index 4e9e32d..b11b880 100644
--- a/com32/chain/chain.c
+++ b/com32/chain/chain.c
@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
if (opt.file) {
fdat.base = (opt.fseg << 4) + opt.foff;
- if (loadfile(opt.file, &fdat.data, &fdat.size)) {
+ if (loadfile(opt.file, &fdat.data, (size_t*)&fdat.size)) {
error("Couldn't read the boot file.");
goto bail;
}
diff --git a/com32/lib/syslinux/debug.c b/com32/lib/syslinux/debug.c
index d9ab863..e8f53d5 100644
--- a/com32/lib/syslinux/debug.c
+++ b/com32/lib/syslinux/debug.c
@@ -1,6 +1,7 @@
#include <linux/list.h>
#include <string.h>
#include <stdbool.h>
+#include <stdio.h>
#ifdef DYNAMIC_DEBUG
diff --git a/com32/libupload/tftp.h b/com32/libupload/tftp.h
index 323dc16..09aa40b 100644
--- a/com32/libupload/tftp.h
+++ b/com32/libupload/tftp.h
@@ -19,4 +19,7 @@ TFTP_OK = 11, /* Not in RFC */
};
extern const char *tftp_string_error_message[];
+
+extern int tftp_put(struct url_info *url, int flags, struct inode *inode,
+ const char **redir, char *data, int data_length);
#endif
--
2.43.0

View File

@ -1,33 +0,0 @@
From c5a4d036fff8925bc10f17d68837b862a9a894e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <mspacek@redhat.com>
Date: Wed, 10 Jul 2024 15:58:33 +0200
Subject: [PATCH] Rewrite Digest::SHA1 to SHA
---
utils/sha1pass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utils/sha1pass b/utils/sha1pass
index 3be2dbc..34cc99c 100755
--- a/utils/sha1pass
+++ b/utils/sha1pass
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use bytes;
-use Digest::SHA1;
+use Digest::SHA;
use MIME::Base64;
sub random_bytes($) {
@@ -29,6 +29,6 @@ sub random_bytes($) {
unless (defined($salt)) {
$salt = MIME::Base64::encode(random_bytes(6), '');
}
-$pass = Digest::SHA1::sha1_base64($salt, $pass);
+$pass = Digest::SHA::sha1_base64($salt, $pass);
print '$4$', $salt, '$', $pass, "\$\n";
--
2.45.2

View File

@ -1,63 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Wed, 24 Jul 2024 12:17:12 -0600
Subject: [PATCH] Fix reported SAST findings
- efi/console.c: Initialize pointer
"Error: UNINIT (CWE-457):
syslinux-6.04-pre1/efi/console.c:242: var_decl: Declaring variable ""first"" without initializer.
syslinux-6.04-pre1/efi/console.c:271: uninit_use: Using uninitialized value ""first"".
"Error: UNINIT (CWE-457):
syslinux-6.04-pre1/efi/console.c:242: var_decl: Declaring variable ""first"" without initializer.
syslinux-6.04-pre1/efi/console.c:282: uninit_use: Using uninitialized value ""first"".
280| }
281|
282|-> if (!first)
283| goto out;
284| rv = 1;"
- xfs_dir2.c: return NULL instead of a freed pointer
Error: USE_AFTER_FREE (CWE-416):
syslinux-6.04-pre1/core/fs/xfs/xfs_dir2.c:521: freed_arg: "free" frees "ip". [Note: The source code implementation of the function has been overridden by a builtin model.]
syslinux-6.04-pre1/core/fs/xfs/xfs_dir2.c:523: use_after_free: Using freed pointer "ip".
# 521| free(ip);
# 522|
# 523|-> return ip;
# 524| }
# 525|
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
core/fs/xfs/xfs_dir2.c | 2 +-
efi/console.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index 2f5928a5..e73e45f1 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -520,7 +520,7 @@ found:
failed:
free(ip);
- return ip;
+ return NULL;
}
static xfs_fsblock_t
diff --git a/efi/console.c b/efi/console.c
index d7ed0b4a..206a8131 100644
--- a/efi/console.c
+++ b/efi/console.c
@@ -239,7 +239,7 @@ struct _EFI_UGA_DRAW_PROTOCOL {
static int setup_uga(struct screen_info *si)
{
- EFI_UGA_DRAW_PROTOCOL *uga, *first;
+ EFI_UGA_DRAW_PROTOCOL *uga, *first = NULL;
EFI_GUID UgaProtocol = EFI_UGA_PROTOCOL_GUID;
UINT32 width, height;
EFI_STATUS status;

View File

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Tue, 27 Jan 2026 13:39:11 -0600
Subject: [PATCH] xfs/xfs_dir2.c: fix use-after-free return
Once on the 'failed' scope, 'ip' is deallocated thus function should return
NULL instead of the deallocated variable.
Fixes:
Error: USE_AFTER_FREE (CWE-416): [#def8] [important]
syslinux-6.04-pre1/core/fs/xfs/xfs_dir2.c:521:5: freed_arg: "free" frees "ip". [Note: The source code implementation of the function has been overridden by a builtin model.]
syslinux-6.04-pre1/core/fs/xfs/xfs_dir2.c:523:5: use_after_free: Using freed pointer "ip".
# 521| free(ip);
# 522|
# 523|-> return ip;
# 524| }
# 525|
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
core/fs/xfs/xfs_dir2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/fs/xfs/xfs_dir2.c b/core/fs/xfs/xfs_dir2.c
index 2f5928a5..e73e45f1 100644
--- a/core/fs/xfs/xfs_dir2.c
+++ b/core/fs/xfs/xfs_dir2.c
@@ -520,7 +520,7 @@ found:
failed:
free(ip);
- return ip;
+ return NULL;
}
static xfs_fsblock_t

View File

@ -1,43 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Tue, 27 Jan 2026 13:44:05 -0600
Subject: [PATCH] efi/console.c: initialized pointer to NULL
Fixes:
Error: UNINIT (CWE-457): [#def9] [important]
syslinux-6.04-pre1/efi/console.c:242:2: var_decl: Declaring variable "first" without initializer.
syslinux-6.04-pre1/efi/console.c:271:3: uninit_use: Using uninitialized value "first".
# 269| &depth, &refresh);
# 270|
# 271|-> if (status == EFI_SUCCESS && (!first || pciio)) {
# 272| width = w;
# 273| height = h;
Error: UNINIT (CWE-457): [#def10] [important]
syslinux-6.04-pre1/efi/console.c:242:2: var_decl: Declaring variable "first" without initializer.
syslinux-6.04-pre1/efi/console.c:282:2: uninit_use: Using uninitialized value "first".
# 280| }
# 281|
# 282|-> if (!first)
# 283| goto out;
# 284| rv = 1;
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
efi/console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/efi/console.c b/efi/console.c
index d7ed0b4a..206a8131 100644
--- a/efi/console.c
+++ b/efi/console.c
@@ -239,7 +239,7 @@ struct _EFI_UGA_DRAW_PROTOCOL {
static int setup_uga(struct screen_info *si)
{
- EFI_UGA_DRAW_PROTOCOL *uga, *first;
+ EFI_UGA_DRAW_PROTOCOL *uga, *first = NULL;
EFI_GUID UgaProtocol = EFI_UGA_PROTOCOL_GUID;
UINT32 width, height;
EFI_STATUS status;

View File

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Tue, 27 Jan 2026 14:00:55 -0600
Subject: [PATCH] extlinux/main.c: close file descriptor
Fixes:
Error: RESOURCE_LEAK (CWE-772): [#def14] [important]
syslinux-6.04-pre1/extlinux/main.c:623:5: open_fn: Returning handle opened by "open". [Note: The source code implementation of the function has been overridden by a user model.]
syslinux-6.04-pre1/extlinux/main.c:623:5: var_assign: Assigning: "fd" = handle returned from "open(c32file, 1053249, 292)".
syslinux-6.04-pre1/extlinux/main.c:630:5: noescape: Resource "fd" is not freed or pointed-to in "xpwrite".
syslinux-6.04-pre1/extlinux/main.c:640:5: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
# 638| free(oldfile);
# 639| free(c32file);
# 640|-> return 0;
# 641|
# 642| bail:
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
extlinux/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/extlinux/main.c b/extlinux/main.c
index ebff7eae..8171c025 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -634,6 +634,9 @@ int ext2_fat_install_file(const char *path, int devfd, struct stat *rst)
goto bail;
}
+ if (fd >= 0)
+ close(fd);
+
free(file);
free(oldfile);
free(c32file);

View File

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Tue, 27 Jan 2026 14:15:10 -0600
Subject: [PATCH] libinstaller/advio.c: deallocated string
Fixes:
Error: RESOURCE_LEAK (CWE-772): [#def26] [important]
syslinux-6.04-pre1/libinstaller/advio.c:104:5: alloc_arg: "asprintf" allocates memory that is stored into "file". [Note: The source code implementation of the function has been overridden by a builtin model.]
syslinux-6.04-pre1/libinstaller/advio.c:112:5: noescape: Resource "file" is not freed or pointed-to in "open". [Note: The source code implementation of the function has been overridden by a user model.]
syslinux-6.04-pre1/libinstaller/advio.c:132:6: noescape: Resource "file" is not freed or pointed-to in "open". [Note: The source code implementation of the function has been overridden by a user model.]
syslinux-6.04-pre1/libinstaller/advio.c:134:3: noescape: Resource "file" is not freed or pointed-to in "fprintf". [Note: The source code implementation of the function has been overridden by a builtin model.]
syslinux-6.04-pre1/libinstaller/advio.c:135:3: leaked_storage: Variable "file" going out of scope leaks the storage it points to.
# 133| if (fd < 0) {
# 134| fprintf(stderr, "Cannot open file '%s' in read/write mode !\nFatal error, exiting.\n", file);
# 135|-> return -EACCES;
# 136| } else if (fstat(fd, &xst) || xst.st_ino != st.st_ino ||
# 137| xst.st_dev != st.st_dev || xst.st_size != st.st_size) {
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
libinstaller/advio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libinstaller/advio.c b/libinstaller/advio.c
index e282e11c..65e70715 100644
--- a/libinstaller/advio.c
+++ b/libinstaller/advio.c
@@ -132,6 +132,8 @@ int write_adv(const char *path, const char *cfg)
fd = open(file, O_RDWR | O_SYNC);
if (fd < 0) {
fprintf(stderr, "Cannot open file '%s' in read/write mode !\nFatal error, exiting.\n", file);
+ if (file)
+ free(file);
return -EACCES;
} else if (fstat(fd, &xst) || xst.st_ino != st.st_ino ||
xst.st_dev != st.st_dev || xst.st_size != st.st_size) {

View File

@ -1,97 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Tue, 27 Jan 2026 14:26:15 -0600
Subject: [PATCH] extlinux/main.c: deallocate devname string before return
Fixes:
Error: RESOURCE_LEAK (CWE-772): [#def20] [important]
syslinux-6.04-pre1/extlinux/main.c:1478:5: alloc_arg: "open_device" allocates memory that is stored into "devname".
syslinux-6.04-pre1/extlinux/main.c:1486:2: leaked_storage: Variable "devname" going out of scope leaks the storage it points to.
# 1484| program);
# 1485| close(devfd);
# 1486|-> return 1;
# 1487| }
# 1488|
Error: RESOURCE_LEAK (CWE-772): [#def21] [important]
syslinux-6.04-pre1/extlinux/main.c:1478:5: alloc_arg: "open_device" allocates memory that is stored into "devname".
syslinux-6.04-pre1/extlinux/main.c:1494:2: leaked_storage: Variable "devname" going out of scope leaks the storage it points to.
# 1492| } else if (ext_read_adv(path, devfd, NULL) < 0) {
# 1493| close(devfd);
# 1494|-> return 1;
# 1495| }
# 1496|
Error: RESOURCE_LEAK (CWE-772): [#def22] [important]
syslinux-6.04-pre1/extlinux/main.c:1478:5: alloc_arg: "open_device" allocates memory that is stored into "devname".
syslinux-6.04-pre1/extlinux/main.c:1499:2: leaked_storage: Variable "devname" going out of scope leaks the storage it points to.
# 1497| if (modify_adv() < 0) {
# 1498| close(devfd);
# 1499|-> return 1;
# 1500| }
# 1501|
Error: RESOURCE_LEAK (CWE-772): [#def23] [important]
syslinux-6.04-pre1/extlinux/main.c:1478:5: alloc_arg: "open_device" allocates memory that is stored into "devname".
syslinux-6.04-pre1/extlinux/main.c:1505:2: leaked_storage: Variable "devname" going out of scope leaks the storage it points to.
# 1503| if (install_file(path, devfd, &fst)) {
# 1504| close(devfd);
# 1505|-> return 1;
# 1506| }
# 1507| if (fst.st_dev != st.st_dev) {
Error: RESOURCE_LEAK (CWE-772): [#def24] [important]
syslinux-6.04-pre1/extlinux/main.c:1478:5: alloc_arg: "open_device" allocates memory that is stored into "devname".
syslinux-6.04-pre1/extlinux/main.c:1511:2: leaked_storage: Variable "devname" going out of scope leaks the storage it points to.
# 1509| program);
# 1510| close(devfd);
# 1511|-> return 1;
# 1512| }
# 1513|
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
extlinux/main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/extlinux/main.c b/extlinux/main.c
index 8171c025..a920cd2a 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -1485,6 +1485,7 @@ static int install_loader(const char *path, int update_only)
if (update_only && !syslinux_already_installed(devfd)) {
fprintf(stderr, "%s: no previous syslinux boot sector found\n",
program);
+ free(devname);
close(devfd);
return 1;
}
@@ -1493,23 +1494,27 @@ static int install_loader(const char *path, int update_only)
if (opt.reset_adv) {
syslinux_reset_adv(syslinux_adv);
} else if (ext_read_adv(path, devfd, NULL) < 0) {
+ free(devname);
close(devfd);
return 1;
}
if (modify_adv() < 0) {
+ free(devname);
close(devfd);
return 1;
}
/* Install ldlinux.sys */
if (install_file(path, devfd, &fst)) {
+ free(devname);
close(devfd);
return 1;
}
if (fst.st_dev != st.st_dev) {
fprintf(stderr, "%s: file system changed under us - aborting!\n",
program);
+ free(devname);
close(devfd);
return 1;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From ca745cdfc27b83b6bcef9f856d858a68c64429de Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 8 Apr 2014 15:28:12 -0400
Subject: [PATCH] Add "install-all target" to top side of HAVE_FIRMWARE.
@ -8,7 +8,7 @@ Subject: [PATCH] Add "install-all target" to top side of HAVE_FIRMWARE.
1 file changed, 10 insertions(+)
diff --git a/Makefile b/Makefile
index b472945..6606d31 100644
index b472945b..6606d319 100644
--- a/Makefile
+++ b/Makefile
@@ -275,6 +275,16 @@ efi64:
@ -28,5 +28,3 @@ index b472945..6606d31 100644
else # FIRMWARE
all: all-local subdirs
--
2.5.5

View File

@ -1,4 +1,4 @@
From af7e95c32cea40c1e443ae301e64b27f068b4915 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paulo Alcantara <pcacjr@zytor.com>
Date: Wed, 11 Oct 2017 07:00:31 -0400
Subject: [PATCH] ext4: Fix 64bit feature
@ -28,7 +28,7 @@ Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/core/fs/ext2/ext2.c b/core/fs/ext2/ext2.c
index 76bd1d5..4bc0a53 100644
index 76bd1d5a..4bc0a535 100644
--- a/core/fs/ext2/ext2.c
+++ b/core/fs/ext2/ext2.c
@@ -25,22 +25,17 @@ static enum dirent_type ext2_cvt_type(unsigned int d_file_type)
@ -85,7 +85,7 @@ index 76bd1d5..4bc0a53 100644
+ EXT2_BLOCKS_PER_GROUP(fs) - 1)
/ EXT2_BLOCKS_PER_GROUP(fs);
diff --git a/core/fs/ext2/ext2_fs.h b/core/fs/ext2/ext2_fs.h
index 803a995..d8d07eb 100644
index 803a9954..d8d07ebd 100644
--- a/core/fs/ext2/ext2_fs.h
+++ b/core/fs/ext2/ext2_fs.h
@@ -278,6 +278,7 @@ struct ext2_sb_info {
@ -96,6 +96,3 @@ index 803a995..d8d07eb 100644
};
static inline struct ext2_sb_info *EXT2_SB(struct fs_info *fs)
--
2.7.4.GIT

View File

@ -1,4 +1,4 @@
From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 19 Apr 2016 06:50:31 -0400
Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
@ -17,7 +17,7 @@ Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/extlinux/main.c b/extlinux/main.c
index a7ebd49..ebff7ea 100644
index a7ebd49a..ebff7eae 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -38,6 +38,7 @@
@ -28,6 +28,3 @@ index a7ebd49..ebff7ea 100644
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/vfs.h>
--
2.10.5.GIT

View File

@ -1,4 +1,4 @@
From 5c24d725d5a5f50f0544fbcc544f08a3f9e90e5d Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 8 Aug 2019 05:41:36 -0400
Subject: [PATCH] Add 'RPMOPTFLAGS' to CFLAGS for some stuff.
@ -11,7 +11,7 @@ Subject: [PATCH] Add 'RPMOPTFLAGS' to CFLAGS for some stuff.
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/extlinux/Makefile b/extlinux/Makefile
index 1721ee54aff..d504e23133e 100644
index 1721ee54..d504e231 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -18,9 +18,9 @@ include $(MAKEDIR)/syslinux.mk
@ -27,7 +27,7 @@ index 1721ee54aff..d504e23133e 100644
SRCS = main.c \
mountinfo.c \
diff --git a/linux/Makefile b/linux/Makefile
index 5a49d813de1..9fed68d02c6 100644
index 5a49d813..9fed68d0 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -18,8 +18,8 @@ include $(MAKEDIR)/syslinux.mk
@ -42,7 +42,7 @@ index 5a49d813de1..9fed68d02c6 100644
SRCS = syslinux.c \
../libinstaller/syslxopt.c \
diff --git a/mtools/Makefile b/mtools/Makefile
index 632b185ba2f..b6e5ebdba6b 100755
index 632b185b..b6e5ebdb 100755
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -2,8 +2,8 @@ include $(MAKEDIR)/syslinux.mk
@ -57,7 +57,7 @@ index 632b185ba2f..b6e5ebdba6b 100755
SRCS = syslinux.c \
../libinstaller/fs.c \
diff --git a/utils/Makefile b/utils/Makefile
index dfe625902ce..b4962353f20 100644
index dfe62590..b4962353 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -17,8 +17,8 @@
@ -71,6 +71,3 @@ index dfe625902ce..b4962353f20 100644
C_TARGETS = isohybrid gethostip memdiskfind
SCRIPT_TARGETS = mkdiskimage
--
2.21.0

View File

@ -1,4 +1,4 @@
From 951928f2cad5682c2844e6bd0f7201236c5d9b66 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Merlin Mathesius <mmathesi@redhat.com>
Date: Wed, 13 May 2020 08:02:27 -0500
Subject: [PATCH] Workaround multiple definition of symbol errors
@ -104,6 +104,3 @@ index bbf23f24..3dd922d5 100644
# We need to rename the .hash section because the EFI firmware
# linker really doesn't like it.
--
2.25.1

View File

@ -1,4 +1,4 @@
From eae06bdce9468d7fde263de1c53f80f2faff0c9e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Merlin Mathesius <mmathesi@redhat.com>
Date: Wed, 13 May 2020 11:58:37 -0500
Subject: [PATCH] Replace builtin strlen that appears to get optimized away
@ -35,6 +35,3 @@ index f648de2d..407d0233 100644
/* This only returns true or false */
static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n)
--
2.25.1

View File

@ -1,4 +1,4 @@
From 7ebe10128eef978e99667d741ed4588d80b38441 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Thu, 21 Oct 2021 15:15:33 -0400
Subject: [PATCH] Fix backspace when editing a multiline cmdline
@ -132,6 +132,3 @@ index 3119b11f..4913f038 100644
/* Add the command to the history if its length is larger than 0 */
len = strlen(ret);
--
2.33.0

7
SOURCES/syslinux.patches Normal file
View File

@ -0,0 +1,7 @@
Patch0001: 0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch
Patch0002: 0002-ext4-Fix-64bit-feature.patch
Patch0003: 0003-extlinux-pull-in-sys-sysmacros.h-for-major-minor-mak.patch
Patch0004: 0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
Patch0005: 0005-Workaround-multiple-definition-of-symbol-errors.patch
Patch0006: 0006-Replace-builtin-strlen-that-appears-to-get-optimized.patch
Patch0007: 0007-Fix-backspace-when-editing-a-multiline-cmdline.patch

View File

@ -1,6 +1,3 @@
# No, please don't break the build. Thanks.
%undefine _auto_set_build_flags
%global buildarches %{ix86} x86_64
%ifnarch %{buildarches}
%global debug_package %{nil}
@ -10,37 +7,24 @@ Summary: Simple kernel loader which boots from a FAT filesystem
Name: syslinux
Version: 6.04
%define tarball_version 6.04-pre1
Release: 0.35%{?dist}
License: GPL-2.0-or-later
Release: 6%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
Source0: http://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_version}.tar.xz
Patch0001: 0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch
Patch0002: 0002-ext4-64bit-feature.patch
Patch0003: 0003-include-sysmacros-h.patch
Patch0004: 0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
Patch0005: 0005-Workaround-multiple-definition-of-symbol-errors.patch
Patch0006: 0006-Replace-builtin-strlen-that-appears-to-get-optimized.patch
Patch0007: 0007-Fix-backspace-when-editing-a-multiline-cmdline.patch
Patch0008: 0008-Fix-build-with-GCC-14.patch
Patch0009: 0009-Rewrite_Digest_SHA1_to_SHA.patch
Patch0010: 0010-xfs-xfs_dir2.c-fix-use-after-free-return.patch
Patch0011: 0011-efi-console.c-initialized-pointer-to-NULL.patch
Patch0012: 0012-extlinux-main.c-close-file-descriptor.patch
Patch0013: 0013-libinstaller-advio.c-deallocated-string.patch
Patch0014: 0014-extlinux-main.c-deallocate-devname-string-before-ret.patch
Patch0015: 0015-zlib-update-to-version-1.2.11.patch
Source1: syslinux.patches
%include %{SOURCE1}
# this is to keep rpmbuild from thinking the .c32 / .com / .0 / memdisk files
# in noarch packages are a reason to stop the build.
%define _binaries_in_noarch_packages_terminate_build 0
BuildRequires: make
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: git
%ifarch %{buildarches}
BuildRequires: gcc
BuildRequires: nasm >= 0.98.38-1, perl-interpreter, perl-generators, netpbm-progs
BuildRequires: perl(FileHandle)
BuildRequires: (glibc-devel(x86-32) or glibc32)
BuildRequires: /usr/include/gnu/stubs-32.h
BuildRequires: libuuid-devel
Requires: syslinux-nonlinux = %{version}-%{release}
%endif
@ -50,7 +34,7 @@ BuildRequires: mingw32-gcc
%endif
%ifarch x86_64
Requires: mtools, libc.so.6()(64bit)
BuildRequires: mingw32-gcc mingw64-gcc
BuildRequires: mingw64-gcc
%endif
# NOTE: extlinux belongs in /sbin, not in /usr/sbin, since it is typically
@ -65,12 +49,14 @@ MEMDISK, which loads legacy operating systems from these media.
%package perl
Summary: Syslinux tools written in perl
Group: Applications/System
%description perl
Syslinux tools written in perl
%package devel
Summary: Headers and libraries for syslinux development.
Group: Development/Libraries
Provides: %{name}-static = %{version}-%{release}
%description devel
@ -78,6 +64,7 @@ Headers and libraries for syslinux development.
%package extlinux
Summary: The EXTLINUX bootloader, for booting the local system.
Group: System/Boot
Requires: syslinux
Requires: syslinux-extlinux-nonlinux = %{version}-%{release}
@ -85,9 +72,10 @@ Requires: syslinux-extlinux-nonlinux = %{version}-%{release}
The EXTLINUX bootloader, for booting the local system, as well as all
the SYSLINUX/PXELINUX modules in /boot.
%ifarch x86_64
%ifarch %{ix86}
%package tftpboot
Summary: SYSLINUX modules in /tftpboot, available for network booting
Group: Applications/Internet
BuildArch: noarch
%description tftpboot
@ -96,6 +84,7 @@ booting in the /tftpboot directory.
%package extlinux-nonlinux
Summary: The parts of the EXTLINUX bootloader which aren't run from linux.
Group: System/Boot
Requires: syslinux
BuildArch: noarch
ExclusiveArch: %{ix86} x86_64
@ -106,6 +95,7 @@ from a linux host.
%package nonlinux
Summary: SYSLINUX modules which aren't run from linux.
Group: System/Boot
Requires: syslinux
BuildArch: noarch
ExclusiveArch: %{ix86} x86_64
@ -119,6 +109,7 @@ systems from media.
%ifarch x86_64
%package efi64
Summary: SYSLINUX binaries and modules for 64-bit UEFI systems
Group: System/Boot
%description efi64
SYSLINUX binaries and modules for 64-bit UEFI systems
@ -168,8 +159,12 @@ rm -f %{buildroot}%{_prefix}/lib/libsyslinux*
rm -f %{buildroot}%{_includedir}/syslinux.h
%endif
%clean
rm -rf %{buildroot}
%ifarch %{buildarches}
%files
%defattr(-,root,root)
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc NEWS README*
@ -177,6 +172,7 @@ rm -f %{buildroot}%{_includedir}/syslinux.h
%doc sample
%{_mandir}/man1/gethostip*
%{_mandir}/man1/syslinux*
%{_mandir}/man1/extlinux*
%{_mandir}/man1/isohybrid*
%{_mandir}/man1/memdiskfind*
%{_bindir}/gethostip
@ -195,6 +191,7 @@ rm -f %{buildroot}%{_includedir}/syslinux.h
%endif
%files perl
%defattr(-,root,root)
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_mandir}/man1/lss16toppm*
@ -211,6 +208,7 @@ rm -f %{buildroot}%{_includedir}/syslinux.h
%{_bindir}/isohybrid.pl
%files devel
%defattr(-,root,root)
%{!?_licensedir:%global license %%doc}
%license COPYING
%dir %{_datadir}/syslinux/com32
@ -218,10 +216,9 @@ rm -f %{buildroot}%{_includedir}/syslinux.h
%files extlinux
%{_sbindir}/extlinux
%{_mandir}/man1/extlinux*
%config /etc/extlinux.conf
%ifarch x86_64
%ifarch %{ix86}
%files tftpboot
/tftpboot
@ -268,102 +265,29 @@ fi
%endif
%changelog
* Tue Mar 31 2026 Josue Hernandez <josherna@redhat.com> - 6.04-0.35
- Update zlib version to zlib-1.2.11
- Resolves: #RHEL-156979
- Resolves: CVE-2022-37434 CVE-2018-25032 CVE-2016-9840
- Resolves: CVE-2016-9841 CVE-2016-9842 CVE-2016-9843
* Wed Aug 03 2022 Robbie Harwood <rharwood@redhat.com> - 6.04-6
- Sync with RHEL 9 / Fedora at their 6.04-0.20
- Resolves: #1748014
* Tue Jan 27 2026 Leo Sandoval <lsandova@redhat.com> - 6.04-0.34
- Fix more SAST true findings
- Resolves: #RHEL-51170
* Fri Nov 13 2020 Javier Martinez Canillas <javierm@redhat.com> - 6.04-5
- Bump release to ship the syslinux-tftpboot subpackage on aarch64
Resolves: rhbz#1870276
* Thu Dec 18 2025 Leo Sandoval <lsandova@redhat.com> - 6.04-0.33
- Bump release number
- Resolves: #RHEL-51170
* Tue Sep 24 2019 Yaakov Selkowitz <yselkowi@redhat.com> - 6.04-4
- Make tftpboot subpackage completely noarch
Resolves: rhbz#1745205
* Tue Mar 18 2025 Leo Sandoval <lsandova@redhat.com> - 6.04-0.32
- Bump version and include previous resolves ticket number on commit message
- Resolves: #RHEL-51170
* Tue Aug 27 2019 Javier Martinez Canillas <javierm@redhat.com> 6.04-3
Drop x86_64 ExclusiveArch for tftpboot subpackage
Resolves: rhbz#1745205
* Wed Feb 19 2025 Leo Sandoval <lsandova@redhat.com> - 6.04-0.31
- Fix true positives SAST findings
- Resolves: #RHEL-51170
* Thu Aug 08 2019 Peter Jones <pjones@redhat.com> - 6.04-2
- Fix a bunch of annocheck problems
Resolves: rhbz#1624176
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 6.04-0.30
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Tue Jul 23 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 6.04-0.29
- Build tftpboot and nonlinux on x86_64
* Thu Jul 11 2024 Michal Josef Špaček <mspacek@redhat.com> - 6.04-0.28
- Rewrite Digest::SHA1 to SHA
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 6.04-0.27
- Bump release for June 2024 mass rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Dec 13 2023 Nicolas Frayer <nfrayer@redhat.com>
- Migrate to SPDX license
- Please refer to https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 27 2022 Robbie Harwood <rharwood@redhat.com> - 6.04-0.22
- Cope with Fedora insisting harder on default buildflags
- Resolves: #2047034
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Oct 21 2021 Robbie Harwood <rharwood@redhat.com> - 6.04-0.20
- Fix behavior of backspace in multiline cmdline editing
* Wed Sep 01 2021 Robbie Harwood <rharwood@redhat.com> - 6.04-0.19
- Place extlinux(1) in the extlinux subpackage
- Resolves: #977004
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed May 13 2020 Merlin Mathesius <mmathesi@redhat.com> - 6.04-0.15
- Patches to fix FTBFS in F32/F33/ELN (RHBZ#1800180)
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Sep 27 2019 Javier Martinez Canillas <javierm@redhat.com> - 6.04-0.13
- Fix a bunch of annocheck problems (pjones)
- Drop x86_64 ExclusiveArch for tftpboot subpackage
- Make tftpboot subpackage completely noarch (yselkowi)
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 10 2019 Scott Talbert <swt@techie.net> - 6.04-0.11
- Add upstream patch to include sysmacros.h to fix FTBFS (#1676107)
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Aug 10 2018 Peter Jones <pjones@redhat.com> - 6.04-1
- extlinux: fix missing include for major()/minor()
Resolves: rhbz#1611751
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: manual.sst_desktop.syslinux.functional}

View File

@ -1,25 +0,0 @@
---
inspections:
# Not a Java package
javabytecode: off
# These just flag when things change "too much"
changedfiles: off
filesize: off
patches: off
upstream: off
# bootloader - can't do anything about executable stack
elf: off
# These are v4-only network functions. Upstream is dead, and this tool is
# legacy, so we can consider it v4-only.
badfuncs: off
# https://bugzilla.redhat.com/show_bug.cgi?id=2029601
annocheck: off
# So here's the thing: I don't care, especially because it's a symlink to
# the same place. Not only was usrmerge a waste of time, but it's the wrong
# direction: stuff in /usr should point to /.
pathmigration: off

View File

@ -1 +0,0 @@
f9c956fde0de29be297402ecbc8ff4d0 syslinux-6.04-pre1.tar.xz