Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
dd52f9d967
!18 [sync] PR-17: Fix leaking file descriptor to child processes
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-07-18 09:07:19 +00:00
Kou Wenqi
a8c02ab3ce Fix leaking file descriptor to child processes
(cherry picked from commit 22522c86b8cd83a428f12d5b8ea5a50690eb86a8)
2024-07-18 16:52:31 +08:00
openeuler-ci-bot
7fed09a1ff
!11 【轻量级 PR】:fix bogus date
From: @zhangshaoning_uniontech 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-06-17 06:53:08 +00:00
zhangshaoning
e85341900d
fix bogus date 2022-06-16 07:05:08 +00:00
openeuler-ci-bot
0c01a7b86e
!10 [sync] PR-7: 移除自我依赖
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-04-20 08:36:59 +00:00
Chenxi Mao
b4c496c1ca Remove self-dependency
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
(cherry picked from commit bdcfd623e48c322120c7caf3783133cd2c9a9ac0)
2022-04-20 10:29:03 +08:00
openeuler-ci-bot
e01bfd6967 !5 add old so file
Merge pull request !5 from 靳智敏/master
2020-08-10 11:13:08 +08:00
jinzhimin369
b37c277cb5 add old so file 2020-08-07 15:32:37 +08:00
openeuler-ci-bot
d67fa2e629 !4 update to 2.0.2
Merge pull request !4 from 靳智敏/master
2020-08-06 20:19:20 +08:00
jinzhimin369
b328ea7c8c update to 2.0.2 2020-08-06 18:14:04 +08:00
5 changed files with 57 additions and 45 deletions

View File

@ -1,32 +0,0 @@
From 4397b3376dc4e4cb1c991d0aed61ce6482614196 Mon Sep 17 00:00:00 2001
From: Joshua Hill <posixninja@gmail.com>
Date: Tue, 29 Dec 2015 23:09:37 +0100
Subject: [PATCH] common: [security fix] Make sure sockets only listen locally
Signed-off-by: Joshua Hill <posixninja@gmail.com>
---
common/socket.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/socket.c b/common/socket.c
index 27b93ba..4cdefd6 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -203,7 +203,7 @@ int socket_create(uint16_t port)
memset((void *) &saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET;
- saddr.sin_addr.s_addr = htonl(INADDR_ANY);
+ saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
saddr.sin_port = htons(port);
if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) {
@@ -368,7 +368,7 @@ int socket_accept(int fd, uint16_t port)
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(port);
addr_len = sizeof(addr);

View File

@ -0,0 +1,28 @@
From c8e627016edd1440c8faf6f9b8f4092a83e01164 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Wed, 1 Nov 2023 14:32:43 +0000
Subject: [PATCH] inotify: Avoid leaking file descriptor to child processes
inotify_init creates a file descriptor which by default is not makes
with CLOEXEC. If the application using libusbmuxd spawns applications
this then leaks through.
---
src/libusbmuxd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index d0cccd1..6f8197b 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -900,7 +900,7 @@ static int usbmuxd_listen_inotify()
return sfd;
sfd = -1;
- inot_fd = inotify_init ();
+ inot_fd = inotify_init1(IN_CLOEXEC);
if (inot_fd < 0) {
LIBUSBMUXD_DEBUG(1, "%s: Failed to setup inotify\n", __func__);
return -2;
--
2.27.0

BIN
2.0.2.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,14 @@
Name: libusbmuxd
Version: 1.0.10
Release: 13
Version: 2.0.2
Release: 4
Summary: software protocol library and tools to communicate with iOS devices natively
License: LGPLv2+ and GPLv2+
URL: http://www.libimobiledevice.org/
Source0: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
Patch0: 0000-CVE-2016-5104.patch
Source0: https://github.com/libimobiledevice/%{name}/archive/%{version}.tar.gz
BuildRequires: gcc git libplist-devel >= 1.11
Patch1: 0001-inotify-Avoid-leaking-file-descriptor-to-child-proce.patch
BuildRequires: gcc libplist-devel >= 2.2.0 autoconf automake libtool
Provides: %{name}-utils
Obsoletes: %{name}-utils
@ -26,18 +27,19 @@ Obsoletes: usbmuxd-devel < 1.0.9
provide head files or other files to support for development with %{name}.
%prep
%autosetup -n %{name}-%{version} -S git -p1
%autosetup -n %{name}-%{version} -p1
NOCONFIGURE=1 ./autogen.sh
%build
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build V=1
%make_build
%install
make install DESTDIR=%{buildroot} INSTALL='install -p'
%make_install
%check
make check
@ -46,18 +48,32 @@ make check
%files
%license COPYING
%doc README AUTHORS
%{_libdir}/libusbmuxd.so.4*
%doc README.md AUTHORS
%{_libdir}/libusbmuxd-2.0.so.*
%{_bindir}/iproxy
%exclude %{_libdir}/*.la
%{_bindir}/inetcat
%{_mandir}/man1/*
%files devel
%{_includedir}/usbmuxd*
%{_libdir}/libusbmuxd.so
%{_libdir}/pkgconfig/libusbmuxd.pc
%{_libdir}/pkgconfig/libusbmuxd-2.0.pc
%{_libdir}/libusbmuxd-2.0.so
%changelog
* Wed Jul 1 2019 Wu Bo <wubo009@163.com> - 1.0.10-13
* Mon Jul 8 2024 kouwenqi <kouwenqi@kylinos.cn> - 2.0.2-4
- Fix leaking file descriptor to child processes
* Mon Apr 18 2022 Chenxi Mao <chenxi.mao@suse.com> - 2.0.2-3
- Remove self-dependency
* Fri Aug 7 2020 jinzhimin<jinzhimin2@huawei.com> - 2.0.2-2
- add old so file
* Thu Aug 6 2020 jinzhimin<jinzhimin2@huawei.com> - 2.0.2-1
- update to 2.0.2
* Mon Jul 1 2019 Wu Bo <wubo009@163.com> - 1.0.10-13
- rebuild package
* Fri Aug 30 2019 louhongxiang <louhongxiang@huawei.com> - 1.0.10-12