diff --git a/boo1237209.patch b/boo1237209.patch new file mode 100644 index 0000000..9c00d94 --- /dev/null +++ b/boo1237209.patch @@ -0,0 +1,22 @@ +From b3384a1fbfa1fee99986e5750ab8e700de4f24ad Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Thu, 5 Dec 2024 18:35:40 +0000 +Subject: [PATCH] PR/579: net147: Fix stack overrun. + +--- + src/readelf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/readelf.c b/src/readelf.c +index fe4cf5413..d209d86df 100644 +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -1728,7 +1728,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, + Elf64_Phdr ph64; + const char *linking_style; + unsigned char nbuf[NBUFSIZE]; +- char interp[128]; ++ char interp[NBUFSIZE]; + ssize_t bufsize; + size_t offset, align, need = 0; + int pie = 0, dynamic = 0; diff --git a/file.changes b/file.changes index f7174f8..e054f4b 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 21 07:27:07 UTC 2025 - Dr. Werner Fink + +- Add patch boo1237209.patch temporary + * Fix stack overrun (boo#1237209) + ------------------------------------------------------------------- Thu Nov 28 10:51:57 UTC 2024 - Dr. Werner Fink diff --git a/file.spec b/file.spec index ce83b50..bb5db5d 100644 --- a/file.spec +++ b/file.spec @@ -1,7 +1,7 @@ # # spec file for package file # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -63,6 +63,7 @@ Patch31: file-5.19-biorad.dif Patch32: file-5.19-clicfs.dif Patch37: file-secure_getenv.patch Patch39: file-5.28-btrfs-image.dif +Patch42: boo1237209.patch Patch43: file-seccomp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc @@ -127,6 +128,7 @@ to develop applications that require the magic "file" interface. %patch -P 37 -p1 -b .getenv %patch -P 39 -p1 -b .btrfs %patch -P 0 -b .0 +%patch -P 42 -p1 %patch -P 43 -p1 -b .seccomp test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in rm -fv src/magic.h diff --git a/python-magic.spec b/python-magic.spec index edd5975..e6d4785 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -1,7 +1,7 @@ # # spec file for package python-magic # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed