Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7e12d72cdc | ||
|
e0091fb996 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -67,3 +67,4 @@
|
|||||||
/util-linux-2.32.1.tar.xz
|
/util-linux-2.32.1.tar.xz
|
||||||
/util-linux-2.33-rc2.tar.xz
|
/util-linux-2.33-rc2.tar.xz
|
||||||
/util-linux-2.33.1.tar.xz
|
/util-linux-2.33.1.tar.xz
|
||||||
|
/util-linux-2.33.2.tar.xz
|
||||||
|
89
libmount-fix-memleak-on-parse-errors.patch
Normal file
89
libmount-fix-memleak-on-parse-errors.patch
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
From 82e39473a5b9139248c94a0d3b2f6432d57566cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Mon, 15 Apr 2019 12:55:46 +0200
|
||||||
|
Subject: [PATCH] libmount: fix memleak on parse errors
|
||||||
|
|
||||||
|
Addresses: https://github.com/systemd/systemd/pull/12252
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
|
||||||
|
index 16e7956af..9b8bfc593 100644
|
||||||
|
--- a/libmount/src/tab_parse.c
|
||||||
|
+++ b/libmount/src/tab_parse.c
|
||||||
|
@@ -95,7 +95,7 @@ static inline const char *skip_nonspearator(const char *p)
|
||||||
|
static int mnt_parse_table_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
{
|
||||||
|
int rc = 0;
|
||||||
|
- char *p;
|
||||||
|
+ char *p = NULL;
|
||||||
|
|
||||||
|
fs->passno = fs->freq = 0;
|
||||||
|
|
||||||
|
@@ -103,6 +103,7 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
p = unmangle(s, &s);
|
||||||
|
if (!p || (rc = __mnt_fs_set_source_ptr(fs, p))) {
|
||||||
|
DBG(TAB, ul_debug("tab parse error: [source]"));
|
||||||
|
+ free(p);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -121,6 +122,7 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
p = unmangle(s, &s);
|
||||||
|
if (!p || (rc = __mnt_fs_set_fstype_ptr(fs, p))) {
|
||||||
|
DBG(TAB, ul_debug("tab parse error: [fstype]"));
|
||||||
|
+ free(p);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -130,11 +132,13 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
p = unmangle(s, &s);
|
||||||
|
if (p && (rc = mnt_fs_set_options(fs, p))) {
|
||||||
|
DBG(TAB, ul_debug("tab parse error: [options]"));
|
||||||
|
+ free(p);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
if (!p)
|
||||||
|
goto done;
|
||||||
|
+ free(p);
|
||||||
|
+
|
||||||
|
s = skip_separator(s);
|
||||||
|
if (!s || !*s)
|
||||||
|
goto done;
|
||||||
|
@@ -250,6 +254,7 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
p = unmangle(s, &s);
|
||||||
|
if (!p || (rc = __mnt_fs_set_fstype_ptr(fs, p))) {
|
||||||
|
DBG(TAB, ul_debug("tab parse error: [fstype]"));
|
||||||
|
+ free(p);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -267,6 +272,7 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
p = unmangle(s, &s);
|
||||||
|
if (!p || (rc = __mnt_fs_set_source_ptr(fs, p))) {
|
||||||
|
DBG(TAB, ul_debug("tab parse error: [regular source]"));
|
||||||
|
+ free(p);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -319,7 +325,8 @@ static int mnt_parse_utab_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
char *v = unmangle(p + 4, &end);
|
||||||
|
if (!v)
|
||||||
|
goto enomem;
|
||||||
|
- __mnt_fs_set_source_ptr(fs, v);
|
||||||
|
+ if (__mnt_fs_set_source_ptr(fs, v))
|
||||||
|
+ free(v);
|
||||||
|
|
||||||
|
} else if (!fs->target && !strncmp(p, "TARGET=", 7)) {
|
||||||
|
fs->target = unmangle(p + 7, &end);
|
||||||
|
@@ -378,6 +385,7 @@ static int mnt_parse_swaps_line(struct libmnt_fs *fs, const char *s)
|
||||||
|
}
|
||||||
|
if (!p || (rc = __mnt_fs_set_source_ptr(fs, p))) {
|
||||||
|
DBG(TAB, ul_debug("tab parse error: [source]"));
|
||||||
|
+ free(p);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (util-linux-2.33.1.tar.xz) = 94ada47e472b62a612c26fd5a5b7423e09366690a8a96f777191a5d920981eb0f224474bc2f128e827299bf60062770011332757e1551a8cd3764b5c70ae4ba2
|
SHA512 (util-linux-2.33.2.tar.xz) = ac88790a0272366b384b54df19cb28318014d98819d5d96aa05528ff17ab57a8c66d012a2f1b59caca4c5d4ea669e8c041e1123517c1f1c2d9960ef701aaf749
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
### Header
|
### Header
|
||||||
Summary: A collection of basic system utilities
|
Summary: A collection of basic system utilities
|
||||||
Name: util-linux
|
Name: util-linux
|
||||||
Version: 2.33.1
|
Version: 2.33.2
|
||||||
Release: 3%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
||||||
URL: http://en.wikipedia.org/wiki/Util-linux
|
URL: http://en.wikipedia.org/wiki/Util-linux
|
||||||
|
|
||||||
@ -93,6 +93,8 @@ Requires: libfdisk = %{version}-%{release}
|
|||||||
###
|
###
|
||||||
# 151635 - makeing /var/log/lastlog
|
# 151635 - makeing /var/log/lastlog
|
||||||
Patch0: 2.28-login-lastlog-create.patch
|
Patch0: 2.28-login-lastlog-create.patch
|
||||||
|
# 1731407 - libmount memory leak
|
||||||
|
Patch1: libmount-fix-memleak-on-parse-errors.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The util-linux package contains a large variety of low-level system
|
The util-linux package contains a large variety of low-level system
|
||||||
@ -910,6 +912,13 @@ fi
|
|||||||
%{_libdir}/python*/site-packages/libmount/
|
%{_libdir}/python*/site-packages/libmount/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 19 2019 Karel Zak <kzak@redhat.com> - 2.33.2-2
|
||||||
|
- fix #1731407 - libmount memory leak
|
||||||
|
|
||||||
|
* Tue Apr 9 2019 Karel Zak <kzak@redhat.com> - 2.33.2-1
|
||||||
|
- upgrade to v2.33.2
|
||||||
|
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/v2.33.2-ReleaseNotes
|
||||||
|
|
||||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.33.1-3
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.33.1-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user