From 305be10f1fa65db6d147544e3840e7aec5934ca9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Sep 2021 09:53:02 +0100 Subject: [PATCH 1/5] Remove unused ntfsprogs/boot.c replacement I checked the current ntfsprogs/boot.c from the tarball and it is correctly licensed so the GPL replacement is no longer required. --- boot-gpl.c | 101 --------------------------------------------------- ntfs-3g.spec | 5 ++- 2 files changed, 4 insertions(+), 102 deletions(-) delete mode 100644 boot-gpl.c diff --git a/boot-gpl.c b/boot-gpl.c deleted file mode 100644 index cde65cc..0000000 --- a/boot-gpl.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * NTFS bootsector, adapted from the vfat one. - */ - -/* mkfs.fat.c - utility to create FAT/MS-DOS filesystems -Copyright (C) 1991 Linus Torvalds -Copyright (C) 1992-1993 Remy Card -Copyright (C) 1993-1994 David Hudson -Copyright (C) 1998 H. Peter Anvin -Copyright (C) 1998-2005 Roman Hodek -Copyright (C) 2008-2014 Daniel Baumann -Copyright (C) 2015 Andreas Bombe -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -The complete text of the GNU General Public License -can be found in /usr/share/common-licenses/GPL-3 file. -*/ - -#include "boot.h" - -#define BOOTCODE_SIZE 4136 - -/* The "boot code" we put into the filesystem... it writes a message and -tells the user to try again */ - -#define MSG_OFFSET_OFFSET 3 - -const unsigned char boot_array[BOOTCODE_SIZE] = - -"\xeb\x52\x90" /* jump to code at 0x54 (0x7c54) */ -"NTFS \0" /* NTFS signature */ - -"\0\0\0\0\0\0\0\0\0\0\0\0" /* 72 bytes for device parameters */ -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" - /* Boot code run at location 0x7c54 */ -"\x0e" /* push cs */ -"\x1f" /* pop ds */ -"\xbe\x71\x7c" /* mov si, offset message_txt (at location 0x7c71) */ - /* write_msg: */ -"\xac" /* lodsb */ -"\x22\xc0" /* and al, al */ -"\x74\x0b" /* jz key_press */ -"\x56" /* push si */ -"\xb4\x0e" /* mov ah, 0eh */ -"\xbb\x07\x00" /* mov bx, 0007h */ -"\xcd\x10" /* int 10h */ -"\x5e" /* pop si */ -"\xeb\xf0" /* jmp write_msg */ - /* key_press: */ -"\x32\xe4" /* xor ah, ah */ -"\xcd\x16" /* int 16h */ -"\xcd\x19" /* int 19h */ -"\xeb\xfe" /* foo: jmp foo */ -/* message_txt: */ -"This is not a bootable disk. Please insert a bootable floppy and\r\n" -"press any key to try again ... \r\n" - /* At location 0xd4, 298 bytes to reach 0x1fe */ - /* 298 = 4 blocks of 72 then 10 */ -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" - -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" - -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" - -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" -"\0\0\0\0\0\0\0\0\0\0\0\0" - -"\0\0\0\0\0\0\0\0\0\0" - /* Boot signature at 0x1fe */ -"\x55\xaa"; diff --git a/ntfs-3g.spec b/ntfs-3g.spec index 6859851..c3c0588 100644 --- a/ntfs-3g.spec +++ b/ntfs-3g.spec @@ -8,7 +8,7 @@ Name: ntfs-3g Summary: Linux NTFS userspace driver Version: 2021.8.22 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz URL: https://www.tuxera.com/company/open-source/ @@ -188,6 +188,9 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README %exclude %{_mandir}/man8/ntfs-3g* %changelog +* Mon Sep 13 2021 Richard W.M. Jones - 2:2021.8.22-3 +- Remove unused ntfsprogs/boot.c replacement + * Wed Sep 8 2021 Tom Callaway - 2:2021.8.22-2 - remove incorrect obsoletes From 1ebc4b0f7665067f80c912ea9d671d018955ebb0 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Wed, 15 Sep 2021 13:32:10 -0400 Subject: [PATCH 2/5] Restyle the spec for legibility --- ntfs-3g.spec | 82 ++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/ntfs-3g.spec b/ntfs-3g.spec index c3c0588..80c5dcb 100644 --- a/ntfs-3g.spec +++ b/ntfs-3g.spec @@ -1,35 +1,39 @@ # Pass --with externalfuse to compile against system fuse lib # Default is internal fuse-lite. -%global with_externalfuse %{?_with_externalfuse:1}%{!?_with_externalfuse:0} +%bcond_with externalfuse # For release candidates # %%global subver -RC -Name: ntfs-3g -Summary: Linux NTFS userspace driver -Version: 2021.8.22 -Release: 3%{?dist} -License: GPLv2+ -Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz -URL: https://www.tuxera.com/company/open-source/ -BuildRequires: make -%if %{with_externalfuse} -BuildRequires: fuse-devel -Requires: fuse +Name: ntfs-3g +Epoch: 2 +Version: 2021.8.22 +Release: 4%{?dist} +Summary: Linux NTFS userspace driver +License: GPLv2+ +URL: https://www.tuxera.com/company/open-source/ +Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz +Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch +BuildRequires: make +# ntfs-3g BuildRequires +BuildRequires: gnutls-devel +BuildRequires: libattr-devel +%if %{with externalfuse} +BuildRequires: fuse-devel +Requires: fuse %endif +# ntfsprogs BuildRequires +BuildRequires: libconfig-devel +BuildRequires: libgcrypt-devel +BuildRequires: libtool +BuildRequires: libuuid-devel +Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} +Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release} +Obsoletes: ntfsprogs-fuse < %{epoch}:%{version}-%{release} +Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release} %if 0%{?fedora} -Recommends: ntfs-3g-system-compression +Recommends: ntfs-3g-system-compression %endif -BuildRequires: libtool, libattr-devel -# ntfsprogs BuildRequires -BuildRequires: libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel -Epoch: 2 -Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release} -Obsoletes: ntfsprogs-fuse -Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} -# For library split out -Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch %description NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS @@ -43,34 +47,33 @@ devices, and FIFOs, ACL, extended attributes; moreover it provides full file access right and ownership support. %package libs -Summary: Runtime libraries for ntfs-3g +Summary: Runtime libraries for ntfs-3g %description libs Libraries for applications to use ntfs-3g functionality. %package devel -Summary: Development files and libraries for ntfs-3g -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} -Requires: pkgconfig -Provides: ntfsprogs-devel = %{epoch}:%{version}-%{release} +Summary: Development files and libraries for ntfs-3g +Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} +Provides: ntfsprogs-devel = %{epoch}:%{version}-%{release} # ntfsprogs-2.0.0-17 was never built. 2.0.0-16 was the last build for that # standalone package. -Obsoletes: ntfsprogs-devel < 2.0.0-17 +Obsoletes: ntfsprogs-devel < 2.0.0-17 %description devel Headers and libraries for developing applications that use ntfs-3g functionality. %package -n ntfsprogs -Summary: NTFS filesystem libraries and utilities -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} +Summary: NTFS filesystem libraries and utilities +Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} # We don't really provide this. This code is dead and buried now. -Provides: ntfsprogs-gnomevfs = %{epoch}:%{version}-%{release} -Obsoletes: ntfsprogs-gnomevfs +Provides: ntfsprogs-gnomevfs = %{epoch}:%{version}-%{release} +Obsoletes: ntfsprogs-gnomevfs < %{epoch}:%{version}-%{release} # Needed to fix multilib issue # ntfsprogs-2.0.0-17 was never built. 2.0.0-16 was the last build for that # standalone package. -Obsoletes: ntfsprogs < 2.0.0-17 +Obsoletes: ntfsprogs < 2.0.0-17 %description -n ntfsprogs The ntfsprogs package currently consists of a library and utilities such as @@ -82,11 +85,11 @@ included utilities see man 8 ntfsprogs after installation). %build -CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" +CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" %configure \ --disable-static \ --disable-ldconfig \ -%if 0%{?_with_externalfuse:1} +%if %{with externalfuse} --with-fuse=external \ %endif --exec-prefix=/ \ @@ -101,7 +104,7 @@ CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" %install %make_install LIBTOOL=%{_bindir}/libtool -rm -rf %{buildroot}%{_libdir}/*.la +find %{buildroot} -type f -name "*.la" -delete -print rm -rf %{buildroot}%{_libdir}/*.a rm -rf %{buildroot}/%{_sbindir}/mount.ntfs-3g @@ -114,7 +117,7 @@ ln -s ntfs-3g ntfsmount popd pushd %{buildroot}/%{_sbindir} ln -s mount.ntfs-3g mount.ntfs-fuse -# And since there is no other package in Fedora that provides an ntfs +# And since there is no other package in Fedora that provides an ntfs # mount... ln -s mount.ntfs-3g mount.ntfs # Need this for fsck to find it @@ -188,6 +191,9 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README %exclude %{_mandir}/man8/ntfs-3g* %changelog +* Wed Sep 15 2021 Neal Gompa - 2:2021.8.22-4 +- Restyle the spec for legibility + * Mon Sep 13 2021 Richard W.M. Jones - 2:2021.8.22-3 - Remove unused ntfsprogs/boot.c replacement From 545219012d4932534785044f44a41e403696df28 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 21:28:03 +0000 Subject: [PATCH 3/5] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ntfs-3g.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ntfs-3g.spec b/ntfs-3g.spec index 80c5dcb..291ab90 100644 --- a/ntfs-3g.spec +++ b/ntfs-3g.spec @@ -8,7 +8,7 @@ Name: ntfs-3g Epoch: 2 Version: 2021.8.22 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Linux NTFS userspace driver License: GPLv2+ URL: https://www.tuxera.com/company/open-source/ @@ -191,6 +191,9 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README %exclude %{_mandir}/man8/ntfs-3g* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2:2021.8.22-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Sep 15 2021 Neal Gompa - 2:2021.8.22-4 - Restyle the spec for legibility From 6efb9de725dffa75f7121106ea685ca04767292d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 8 Jun 2022 10:05:06 +0100 Subject: [PATCH 4/5] New upstream version 2022.5.17 Fixes: CVE-2021-46790, CVE-2022-30783, CVE-2022-30784, CVE-2022-30785, CVE-2022-30786, CVE-2022-30787, CVE-2022-30788, CVE-2022-30789 --- ntfs-3g.spec | 9 +++++++-- sources | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ntfs-3g.spec b/ntfs-3g.spec index 291ab90..f10969c 100644 --- a/ntfs-3g.spec +++ b/ntfs-3g.spec @@ -7,8 +7,8 @@ Name: ntfs-3g Epoch: 2 -Version: 2021.8.22 -Release: 5%{?dist} +Version: 2022.5.17 +Release: 1%{?dist} Summary: Linux NTFS userspace driver License: GPLv2+ URL: https://www.tuxera.com/company/open-source/ @@ -191,6 +191,11 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README %exclude %{_mandir}/man8/ntfs-3g* %changelog +* Wed Jun 08 2022 Richard W.M. Jones - 2:2022.5.17-1 +- New upstream version 2022.5.17 +- Fixes: CVE-2021-46790, CVE-2022-30783, CVE-2022-30784, CVE-2022-30785, + CVE-2022-30786, CVE-2022-30787, CVE-2022-30788, CVE-2022-30789 + * Thu Jan 20 2022 Fedora Release Engineering - 2:2021.8.22-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 1aad200..0bfb86f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ntfs-3g_ntfsprogs-2021.8.22.tgz) = e0544df78a6c352999e1206d7b5d71c56e39396b7a0936a261d728c2ac9d61c6b95ef297f8529ac2a5146f31c1c9e43066d3e281064d4f5d781a04eba51f536d +SHA512 (ntfs-3g_ntfsprogs-2022.5.17.tgz) = 25e6d3412958576b0cd614f5d93201c0d7e8bbee78fbaf956718a3825c1435b3f0c3631ea1cc60b5b1be6e9ae7d58c0c03b0bebb69edee3bf181a966734336df From 63da5900aed311cadd5300dc2ac79ef5bae56ff1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 00:51:51 +0000 Subject: [PATCH 5/5] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ntfs-3g.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ntfs-3g.spec b/ntfs-3g.spec index f10969c..82e5d9f 100644 --- a/ntfs-3g.spec +++ b/ntfs-3g.spec @@ -8,7 +8,7 @@ Name: ntfs-3g Epoch: 2 Version: 2022.5.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Linux NTFS userspace driver License: GPLv2+ URL: https://www.tuxera.com/company/open-source/ @@ -191,6 +191,9 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README %exclude %{_mandir}/man8/ntfs-3g* %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 2:2022.5.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 08 2022 Richard W.M. Jones - 2:2022.5.17-1 - New upstream version 2022.5.17 - Fixes: CVE-2021-46790, CVE-2022-30783, CVE-2022-30784, CVE-2022-30785,