!3 fix CVE-2019-9755
From: @zhanghua1831 Reviewed-by: @yanzh_h Signed-off-by: @yanzh_h
This commit is contained in:
commit
7e6695ff9a
46
CVE-2019-9755.patch
Normal file
46
CVE-2019-9755.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff -up ntfs-3g_ntfsprogs-2017.3.23/src/lowntfs-3g.c.CVE-2019-9755 ntfs-3g_ntfsprogs-2017.3.23/src/lowntfs-3g.c
|
||||
--- ntfs-3g_ntfsprogs-2017.3.23/src/lowntfs-3g.c.CVE-2019-9755 2019-03-29 16:08:22.359920075 -0400
|
||||
+++ ntfs-3g_ntfsprogs-2017.3.23/src/lowntfs-3g.c 2019-03-29 16:08:28.237794169 -0400
|
||||
@@ -4323,7 +4323,8 @@ int main(int argc, char *argv[])
|
||||
else {
|
||||
ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
|
||||
if (ctx->abs_mnt_point) {
|
||||
- if (getcwd(ctx->abs_mnt_point,
|
||||
+ if ((strlen(opts.mnt_point) < PATH_MAX)
|
||||
+ && getcwd(ctx->abs_mnt_point,
|
||||
PATH_MAX - strlen(opts.mnt_point) - 1)) {
|
||||
strcat(ctx->abs_mnt_point, "/");
|
||||
strcat(ctx->abs_mnt_point, opts.mnt_point);
|
||||
@@ -4331,6 +4332,9 @@ int main(int argc, char *argv[])
|
||||
/* Solaris also wants the absolute mount point */
|
||||
opts.mnt_point = ctx->abs_mnt_point;
|
||||
#endif /* defined(__sun) && defined (__SVR4) */
|
||||
+ } else {
|
||||
+ free(ctx->abs_mnt_point);
|
||||
+ ctx->abs_mnt_point = (char*)NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -up ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c.CVE-2019-9755 ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c
|
||||
--- ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c.CVE-2019-9755 2019-03-29 16:08:54.691227528 -0400
|
||||
+++ ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c 2019-03-29 16:09:40.362249397 -0400
|
||||
@@ -4123,7 +4123,8 @@ int main(int argc, char *argv[])
|
||||
else {
|
||||
ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
|
||||
if (ctx->abs_mnt_point) {
|
||||
- if (getcwd(ctx->abs_mnt_point,
|
||||
+ if ((strlen(opts.mnt_point) < PATH_MAX)
|
||||
+ && getcwd(ctx->abs_mnt_point,
|
||||
PATH_MAX - strlen(opts.mnt_point) - 1)) {
|
||||
strcat(ctx->abs_mnt_point, "/");
|
||||
strcat(ctx->abs_mnt_point, opts.mnt_point);
|
||||
@@ -4131,6 +4132,9 @@ int main(int argc, char *argv[])
|
||||
/* Solaris also wants the absolute mount point */
|
||||
opts.mnt_point = ctx->abs_mnt_point;
|
||||
#endif /* defined(__sun) && defined (__SVR4) */
|
||||
+ } else {
|
||||
+ free(ctx->abs_mnt_point);
|
||||
+ ctx->abs_mnt_point = (char*)NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
ntfs-3g.spec
11
ntfs-3g.spec
@ -1,6 +1,6 @@
|
||||
Name: ntfs-3g
|
||||
Version: 2017.3.23
|
||||
Release: 10
|
||||
Release: 11
|
||||
Epoch: 2
|
||||
Summary: Linux NTFS userspace driver
|
||||
License: GPLv2+
|
||||
@ -10,7 +10,7 @@ Patch0: 0000-ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.p
|
||||
Patch1: 0001-check-mftmirr.patch
|
||||
Patch2: 0002-ntfs-3g-big-sectors.patch
|
||||
Patch3: 0003-ntfsclone-full-clusters-bz1601146.patch
|
||||
|
||||
Patch4: CVE-2019-9755.patch
|
||||
BuildRequires: libtool, libattr-devel, libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel
|
||||
Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: ntfsprogs-fuse
|
||||
@ -48,6 +48,7 @@ This package includes man files for %{name}.
|
||||
%patch1 -p0 -b .check-mftmirr
|
||||
%patch2 -p0 -b .big-sectors
|
||||
%patch3 -p0 -b .ntfsclone
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
|
||||
@ -95,5 +96,11 @@ rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/README
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 8 2020 zhanghua <zhanghua40@huawei.com> - 2:2017.3.23-11
|
||||
- Type:bugfix
|
||||
- Id:NA
|
||||
- SUG:NA
|
||||
- DESC:fix CVE-2019-9755
|
||||
|
||||
* Fri Dec 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:2017.3.23-10
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user