Compare commits
10 Commits
a45f4f755c
...
d425ea914d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d425ea914d | ||
|
|
77518580ae | ||
|
|
cfb715b959 | ||
|
|
0209af1da7 | ||
|
|
7b5aea1cf0 | ||
|
|
68f773bc79 | ||
|
|
4b7bd3fed5 | ||
|
|
308a91401c | ||
|
|
f97be1b90d | ||
|
|
8b5008fe51 |
@ -1,4 +1,4 @@
|
||||
From ca0eb08b7f58a6ecffc1cb13b17a7fdc2f1cd7f2 Mon Sep 17 00:00:00 2001
|
||||
From 12d33952b12f3d632ef6a548f14e6452ed751de4 Mon Sep 17 00:00:00 2001
|
||||
From: Shijie Luo <luoshijie1@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 17:14:38 +0800
|
||||
Subject: [PATCH] fix chown and mknod failed
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Shijie Luo <luoshijie1@huawei.com>
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/util/install_helper.sh b/util/install_helper.sh
|
||||
index cb649a7..a948fcc 100755
|
||||
index 76f2b47..17ef4f0 100644
|
||||
--- a/util/install_helper.sh
|
||||
+++ b/util/install_helper.sh
|
||||
@@ -27,13 +27,7 @@ install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
|
||||
@@ -28,13 +28,7 @@ install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
|
||||
"${DESTDIR}${sysconfdir}/fuse.conf"
|
||||
|
||||
if $useroot; then
|
||||
@ -26,7 +26,7 @@ index cb649a7..a948fcc 100755
|
||||
- fi
|
||||
fi
|
||||
|
||||
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
|
||||
if [ "${udevrulesdir}" != "" ]; then
|
||||
--
|
||||
1.8.3.1
|
||||
2.38.1.windows.1
|
||||
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
From 2da64ec9a37d684b73882574f391f9ad366b3c0d Mon Sep 17 00:00:00 2001
|
||||
From: Frank Dinoff <fdinoff@google.com>
|
||||
Date: Mon, 21 Mar 2022 13:13:21 -0400
|
||||
Subject: [PATCH] Fix fd leak with clone_fd
|
||||
|
||||
do_interrupt would destroy_req on the request without decrementing the
|
||||
channel's refcount. With clone_fd this could leak file descriptors if
|
||||
the worker thread holding the cloned fd was destroyed. (Only
|
||||
max_idle_threads are kept).
|
||||
---
|
||||
lib/fuse_lowlevel.c | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
|
||||
index b5638fc..3a1e7d8 100644
|
||||
--- a/lib/fuse_lowlevel.c
|
||||
+++ b/lib/fuse_lowlevel.c
|
||||
@@ -123,6 +123,7 @@ static void list_add_req(struct fuse_req *req, struct fuse_req *next)
|
||||
|
||||
static void destroy_req(fuse_req_t req)
|
||||
{
|
||||
+ assert(req->ch == NULL);
|
||||
pthread_mutex_destroy(&req->lock);
|
||||
free(req);
|
||||
}
|
||||
@@ -1712,8 +1713,11 @@ static int find_interrupted(struct fuse_session *se, struct fuse_req *req)
|
||||
|
||||
pthread_mutex_lock(&se->lock);
|
||||
curr->ctr--;
|
||||
- if (!curr->ctr)
|
||||
+ if (!curr->ctr) {
|
||||
+ fuse_chan_put(req->ch);
|
||||
+ req->ch = NULL;
|
||||
destroy_req(curr);
|
||||
+ }
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1739,9 +1743,11 @@ static void do_interrupt(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
|
||||
req->u.i.unique = arg->unique;
|
||||
|
||||
pthread_mutex_lock(&se->lock);
|
||||
- if (find_interrupted(se, req))
|
||||
+ if (find_interrupted(se, req)) {
|
||||
+ fuse_chan_put(req->ch);
|
||||
+ req->ch = NULL;
|
||||
destroy_req(req);
|
||||
- else
|
||||
+ } else
|
||||
list_add_req(req, &se->interrupts);
|
||||
pthread_mutex_unlock(&se->lock);
|
||||
}
|
||||
--
|
||||
2.24.0.windows.2
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
From b701673e7429336248c307c93c2c26f443719255 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Schubert <bernd.schubert@fastmail.fm>
|
||||
Date: Sun, 5 May 2024 13:09:56 +0200
|
||||
Subject: [PATCH] Fix missing fuse_loop_cfg_destroy() in
|
||||
fuse_session_loop_mt_31 (#944)
|
||||
|
||||
All credits to Miklos Szeredi <miklos@szeredi.hu> for spotting
|
||||
this.
|
||||
|
||||
Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
|
||||
|
||||
---
|
||||
lib/fuse_loop_mt.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
|
||||
index 0200d73..bfe33ca 100644
|
||||
--- a/lib/fuse_loop_mt.c
|
||||
+++ b/lib/fuse_loop_mt.c
|
||||
@@ -419,10 +419,15 @@ int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd);
|
||||
FUSE_SYMVER("fuse_session_loop_mt_31", "fuse_session_loop_mt@FUSE_3.0")
|
||||
int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd)
|
||||
{
|
||||
+ int err;
|
||||
struct fuse_loop_config *config = fuse_loop_cfg_create();
|
||||
if (clone_fd > 0)
|
||||
fuse_loop_cfg_set_clone_fd(config, clone_fd);
|
||||
- return fuse_session_loop_mt_312(se, config);
|
||||
+ err = fuse_session_loop_mt_312(se, config);
|
||||
+
|
||||
+ fuse_loop_cfg_destroy(config);
|
||||
+
|
||||
+ return err;
|
||||
}
|
||||
|
||||
struct fuse_loop_config *fuse_loop_cfg_create(void)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
49
0004-add-nullptr-check-in-fuse_session_mount.patch
Normal file
49
0004-add-nullptr-check-in-fuse_session_mount.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From f88e08f34d2d4f398f23797707e1c50cd306e405 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Schubert <bschubert@ddn.com>
|
||||
Date: Tue, 25 Jun 2024 07:05:19 +0200
|
||||
Subject: [PATCH] Add nullptr check in fuse_session_mount
|
||||
|
||||
The pointer did not have any sanity check.
|
||||
|
||||
Addresses https://github.com/libfuse/libfuse/issues/979
|
||||
|
||||
---
|
||||
lib/fuse_lowlevel.c | 5 +++++
|
||||
lib/mount_util.c | 5 +++++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
|
||||
index fdef193..47c3065 100644
|
||||
--- a/lib/fuse_lowlevel.c
|
||||
+++ b/lib/fuse_lowlevel.c
|
||||
@@ -3145,6 +3145,11 @@ int fuse_session_mount(struct fuse_session *se, const char *mountpoint)
|
||||
{
|
||||
int fd;
|
||||
|
||||
+ if (mountpoint == NULL) {
|
||||
+ fuse_log(FUSE_LOG_ERR, "Invalid null-ptr mountpoint!\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Make sure file descriptors 0, 1 and 2 are open, otherwise chaos
|
||||
* would ensue.
|
||||
diff --git a/lib/mount_util.c b/lib/mount_util.c
|
||||
index 8027a2e..c90ba92 100644
|
||||
--- a/lib/mount_util.c
|
||||
+++ b/lib/mount_util.c
|
||||
@@ -363,6 +363,11 @@ int fuse_mnt_parse_fuse_fd(const char *mountpoint)
|
||||
int fd = -1;
|
||||
int len = 0;
|
||||
|
||||
+ if (mountpoint == NULL) {
|
||||
+ fprintf(stderr, "Invalid null-ptr mount-point!\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
if (sscanf(mountpoint, "/dev/fd/%u%n", &fd, &len) == 1 &&
|
||||
len == strlen(mountpoint)) {
|
||||
return fd;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Binary file not shown.
BIN
fuse-3.16.2.tar.gz
Normal file
BIN
fuse-3.16.2.tar.gz
Normal file
Binary file not shown.
33
fuse3.spec
33
fuse3.spec
@ -1,17 +1,18 @@
|
||||
%global fuse3ver 3.10.5
|
||||
%global fuse3ver 3.16.2
|
||||
|
||||
Name: fuse3
|
||||
Version: %{fuse3ver}
|
||||
Release: 5
|
||||
Release: 3
|
||||
Summary: User space File System of fuse3
|
||||
License: GPL+ and LGPLv2+
|
||||
URL: http://fuse.sf.net
|
||||
Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{fuse3ver}/fuse-%{fuse3ver}.tar.xz
|
||||
Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{fuse3ver}/fuse-%{fuse3ver}.tar.gz
|
||||
Source1: fuse.conf
|
||||
|
||||
Patch1: 0001-fix-chown-and-mknod-failed.patch
|
||||
Patch2: 0002-revert-fuse_daemonize-chdir-to-even-if-not-run.patch
|
||||
Patch3: 0003-Fix-fd-leak-with-clone_fd.patch
|
||||
Patch1: 0001-fix-chown-and-mknod-failed.patch
|
||||
Patch2: 0002-revert-fuse_daemonize-chdir-to-even-if-not-run.patch
|
||||
Patch3: 0003-fix-missing-fuse_loop_cfg_destroy-in-fuse_session_lo.patch
|
||||
Patch4: 0004-add-nullptr-check-in-fuse_session_mount.patch
|
||||
|
||||
BuildRequires: libselinux-devel, pkgconfig, systemd-udev, meson, fdupes
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel, ninja-build
|
||||
@ -102,6 +103,26 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 27 2024 yanshuai <yanshuai01@kylinos.cn> -3.16.2-3
|
||||
- Add nullptr check in fuse_session_mount
|
||||
|
||||
* Wed Jul 24 2024 kouwenqi <kouwenqi@kylinos.cn> -3.16.2-2
|
||||
- Fix missing fuse_loop_cfg_destroy() in fuse_session_loop_mt_31 (#944)
|
||||
|
||||
* Tue Jan 30 2024 yangyun <yangyun50@huawei.com> -3.16.2-1
|
||||
- upgrade to 3.16.2
|
||||
- fix some issues (see: https://github.com/libfuse/libfuse/releases)
|
||||
- improved support for some less common systems (32bit, alternative libcs)
|
||||
- unsupported mount options are no longer silently accepted
|
||||
- auto_unmount is now compatible with allow_other
|
||||
- readdir kernel cache can be enabled from high-level API
|
||||
|
||||
* Tue Jul 11 2023 zhanchengbin <zhanchengbin1@huawei.com> -3.13.0-2
|
||||
- backport upstream patches
|
||||
|
||||
* Thu Feb 9 2023 zhanchengbin <zhanchengbin1@huawei.com> -3.13.0-1
|
||||
- upgrade to 3.13.0
|
||||
|
||||
* Wed Dec 7 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> -3.10.5-5
|
||||
- fix fd leak with clone_fd
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user