diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2021-03-01 12:58:15 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-02-28 23:51:14 -0800 |
commit | a71d1dc472139348a1a2a2eb17a0c91ed55406ee (patch) | |
tree | ef0b3e8293229da4f71184a49f34f29791a13cb2 /meta-networking/recipes-daemons | |
parent | f8c29cd3be52078d8adbdc92592ded73b44a38f5 (diff) | |
download | meta-openembedded-a71d1dc472139348a1a2a2eb17a0c91ed55406ee.tar.gz |
vsftpd: allow newfstatat and pselect6 syscalls in the seccomp sandbox
Allow newfstatat and pselect6 in the seccomp sanbox for glibc 2.33.
Fixes the following OOPS error:
root@qemux86-64:~# tnftp 192.168.1.1
Connected to 192.168.1.1.
220 (vsFTPd 3.0.3)
Name (192.168.1.1:root): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
OOPS: priv_sock_get_cmd
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-seccompsandbox.c-allow-newfstatat-and-pselect6-sysca.patch | 51 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-seccompsandbox.c-allow-newfstatat-and-pselect6-sysca.patch b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-seccompsandbox.c-allow-newfstatat-and-pselect6-sysca.patch new file mode 100644 index 000000000..29ce85cc1 --- /dev/null +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd-3.0.3/0001-seccompsandbox.c-allow-newfstatat-and-pselect6-sysca.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 7bc261076ec94efa3197beaca39eba095d162b5e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Fri, 26 Feb 2021 16:32:27 +0800 | ||
4 | Subject: [PATCH] seccompsandbox.c: allow newfstatat and pselect6 syscalls in | ||
5 | the seccomp sandbox | ||
6 | |||
7 | Allow newfstatat and pselect6 in the seccomp sanbox for glibc 2.33. | ||
8 | |||
9 | Fixes the following OOPS error: | ||
10 | root@qemux86-64:~# tnftp 192.168.1.1 | ||
11 | Connected to 192.168.1.1. | ||
12 | 220 (vsFTPd 3.0.3) | ||
13 | Name (192.168.1.1:root): anonymous | ||
14 | 331 Please specify the password. | ||
15 | Password: | ||
16 | 230 Login successful. | ||
17 | Remote system type is UNIX. | ||
18 | Using binary mode to transfer files. | ||
19 | ftp> ls | ||
20 | OOPS: priv_sock_get_cmd | ||
21 | |||
22 | Upstream-Status: Pending | ||
23 | |||
24 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
25 | --- | ||
26 | seccompsandbox.c | 2 ++ | ||
27 | 1 file changed, 2 insertions(+) | ||
28 | |||
29 | diff --git a/seccompsandbox.c b/seccompsandbox.c | ||
30 | index 377c50e..f601241 100644 | ||
31 | --- a/seccompsandbox.c | ||
32 | +++ b/seccompsandbox.c | ||
33 | @@ -267,6 +267,7 @@ seccomp_sandbox_setup_data_connections() | ||
34 | 3, IPPROTO_TCP); | ||
35 | allow_nr(__NR_bind); | ||
36 | allow_nr(__NR_select); | ||
37 | + allow_nr(__NR_pselect6); | ||
38 | if (tunable_port_enable) | ||
39 | { | ||
40 | allow_nr(__NR_connect); | ||
41 | @@ -411,6 +412,7 @@ seccomp_sandbox_setup_postlogin(const struct vsf_session* p_sess) | ||
42 | allow_nr(__NR_getdents); | ||
43 | allow_nr(__NR_getdents64); | ||
44 | allow_nr(__NR_sysinfo); | ||
45 | + allow_nr(__NR_newfstatat); | ||
46 | /* Misc */ | ||
47 | allow_nr(__NR_umask); | ||
48 | |||
49 | -- | ||
50 | 2.17.1 | ||
51 | |||
diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb index df0d7f455..024b776de 100644 --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb | |||
@@ -22,6 +22,7 @@ SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ | |||
22 | ${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)} \ | 22 | ${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', 'file://vsftpd-tcp_wrappers-support.patch', '', d)} \ |
23 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)} \ | 23 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '${NOPAM_SRC}', d)} \ |
24 | file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \ | 24 | file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \ |
25 | file://0001-seccompsandbox.c-allow-newfstatat-and-pselect6-sysca.patch \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/v/vsftpd/" | 28 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/v/vsftpd/" |